-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy patheslint.config.mjs
40 lines (39 loc) · 1.1 KB
/
eslint.config.mjs
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
import eslint from '@eslint/js'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import globals from 'globals'
import typescript from 'typescript-eslint'
export default typescript.config(
eslint.configs.recommended,
typescript.configs.strictTypeChecked,
typescript.configs.stylisticTypeChecked,
react.configs.flat.recommended,
react.configs.flat['jsx-runtime'],
reactHooks.configs['recommended-latest'],
{
rules: {
'no-console': 'error',
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'react/no-unescaped-entities': 'off',
},
languageOptions: {
globals: {
...globals.browser,
},
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
settings: {
react: {
version: 'detect',
},
},
},
{
// Note: there must be no other properties in this object
ignores: ['build/', 'public/', 'example/build/', 'rollup.config.mjs'],
},
)