-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
56 lines (55 loc) · 1.57 KB
/
.eslintrc.cjs
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
52
53
54
55
56
/** @type {import('eslint').Linter.Config} */
const config = {
env: {
browser: true,
node: true,
},
globals: {},
extends: ['plugin:react/recommended', 'standard', 'plugin:react-hooks/recommended', 'plugin:import/typescript'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2020,
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint', 'import', 'react-refresh'],
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
react: {
version: '16.14.0',
},
},
rules: {
'no-undef': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/no-use-before-define': 'off',
camelcase: 'off',
'comma-dangle': 'off',
'func-call-spacing': 'off',
'import/no-absolute-path': 'off',
'import/order': ['error', { groups: ['builtin', 'external', 'internal'] }],
'import/un-resolved': 'off',
indent: 'off',
'multiline-ternary': 'off',
'no-console': 'warn',
'no-unused-expressions': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
'no-useless-escape': 'off',
'prefer-regex-literals': 'off',
'react/no-unknown-property': 'error',
'react/prop-types': 'off',
'react/self-closing-comp': ['error', { component: true, html: true }],
'react/react-in-jsx-scope': 'off',
'react-refresh/only-export-components': 'warn',
'space-before-function-paren': 'off',
},
}
module.exports = config