-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
68 lines (68 loc) · 1.79 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
57
58
59
60
61
62
63
64
65
66
67
68
module.exports = {
env: {
browser: true,
commonjs: true,
es6: true,
jest: false,
node: true,
},
parser: '@babel/eslint-parser',
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:testing-library/react',
],
parserOptions: {
babelOptions: {
presets: [ '@babel/preset-react' ],
},
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2022,
requireConfigFile: false,
sourceType: 'module',
},
plugins: [
'import',
'etc',
'@typescript-eslint',
'eslint-plugin-no-inline-styles',
'destructuring',
'vitest',
],
root: true,
rules: {
quotes: [ 'error', 'single', { avoidEscape: true, allowTemplateLiterals: true } ],
semi: [ 'error', 'always' ],
'react/display-name': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'no-var': 'error',
'no-trailing-spaces': 'error',
'space-infix-ops': 'error',
'arrow-spacing': 'error',
'prefer-const': 'error',
'space-in-parens': [ 'error', 'never' ],
'arrow-parens': [ 'error', 'as-needed' ],
'comma-dangle': [ 'error', 'always-multiline' ],
'max-len': [ 'error', { code: 120 } ],
'no-console': [ 'error', { allow: [ 'log', 'warn', 'error' ] } ],
'no-unused-vars': 'error',
'no-undef': 'error',
'no-duplicate-imports': 'error',
'object-curly-spacing': [ 'error', 'always' ],
'array-bracket-spacing': [ 'error', 'always' ],
'react/forbid-component-props': [ 2, { forbid: [ 'style', 'className' ] } ],
'etc/no-commented-out-code': 'error',
'no-inline-styles/no-inline-styles': 'error',
'destructuring/in-params': 'error',
},
settings: {
react: {
version: 'detect',
},
},
};