-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
51 lines (48 loc) · 1.39 KB
/
eslint.config.js
File metadata and controls
51 lines (48 loc) · 1.39 KB
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
42
43
44
45
46
47
48
49
50
51
import js from '@eslint/js'
import react from 'eslint-plugin-react'
import globals from 'globals'
export default [
js.configs.recommended,
{ ignores: ['dist/**', 'release/**'] },
{
files: ['**/*.{js,jsx,mjs}'],
plugins: { react },
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser,
...globals.node
},
parserOptions: {
ecmaFeatures: { jsx: true }
}
},
settings: {
react: { version: 'detect' }
},
rules: {
curly: 'error',
eqeqeq: ['error', 'always'],
'no-var': 'error',
'prefer-const': 'error',
'no-self-compare': 'error',
'no-template-curly-in-string': 'warn',
'no-throw-literal': 'error',
'no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'no-constant-binary-expression': 'error',
'no-constructor-return': 'error',
'no-duplicate-imports': 'warn',
'no-promise-executor-return': 'error',
'no-unmodified-loop-condition': 'warn',
'no-unreachable-loop': 'warn',
'no-use-before-define': ['error', { functions: false }],
'react/jsx-uses-vars': 'error',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-key': 'error',
'react/jsx-no-target-blank': 'error',
'react/no-danger': 'warn'
}
}
]