-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
92 lines (92 loc) · 2.12 KB
/
.eslintrc.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
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
module.exports = {
env: {
browser: true,
es2021: true,
jest: true
},
extends: [
'plugin:react/recommended',
'airbnb',
'plugin:prettier/recommended',
'plugin:storybook/recommended'
],
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 12,
sourceType: 'module'
},
plugins: ['react'],
rules: {
// General https://eslint.org/docs/latest/rules/
/*
"off"/0 - turn the rule off
"warn"/1 - turn the rule on as a warning
"error"/2 - turn the rule on as an error (exit code 1)
*/
camelcase: 1,
'max-len': [
1,
{
code: 80,
tabWidth: 2,
comments: 80,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true
}
],
'class-methods-use-this': 0,
'import/prefer-default-export': 0,
'import/no-mutable-exports': 0,
'no-plusplus': [2, { allowForLoopAfterthoughts: true }],
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md#options
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: true
}
],
'no-class-assign': 0,
'no-console': [
1,
{
allow: ['error']
}
],
'no-continue': 0,
'no-func-assign': 0,
'no-nested-ternary': 1,
'no-restricted-syntax': 0,
'no-unused-vars': 2,
'no-use-before-define': 0,
// React
'react/destructuring-assignment': 0,
'react/function-component-definition': 0,
'react/no-multi-comp': 0,
'react/no-unescaped-entities': 0,
'react/prop-types': 0,
'react/react-in-jsx-scope': 0,
// JSX-specific
'jsx-a11y/click-events-have-key-events': 0,
'react/jsx-filename-extension': [
1,
{
extensions: ['.js', '.jsx']
}
],
'react/jsx-one-expression-per-line': 0,
'react/jsx-props-no-spreading': 1
},
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', 'src']
}
}
}
}