-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
41 lines (39 loc) · 1.25 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// @ts-check
import js from '@eslint/js'
import pluginQuery from '@tanstack/eslint-plugin-query'
import pluginRouter from '@tanstack/eslint-plugin-router'
import eslintConfigPrettier from 'eslint-config-prettier'
import reactPlugin from 'eslint-plugin-react'
import reactRefresh from 'eslint-plugin-react-refresh'
import globals from 'globals'
import ts_eslint from 'typescript-eslint'
export default ts_eslint.config({
extends: [
js.configs.recommended,
...ts_eslint.configs.recommendedTypeChecked,
reactPlugin.configs['jsx-runtime'].flat,
reactPlugin.configs['recommended'].flat,
...pluginQuery.configs['flat/recommended'],
...pluginRouter.configs['flat/recommended'],
eslintConfigPrettier
],
files: ['**/*.{ts,tsx}'],
ignores: ['dist', 'node_modules'],
plugins: {
'react-refresh': reactRefresh
},
languageOptions: {
ecmaVersion: 2023,
globals: globals.browser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname
}
},
rules: {
'@typescript-eslint/consistent-type-exports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/consistent-type-definitions': 'error'
}
})