-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.eslintrc.js
More file actions
70 lines (68 loc) · 1.81 KB
/
.eslintrc.js
File metadata and controls
70 lines (68 loc) · 1.81 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
const rules = {
// import/exports
'import/exports-last': 'error',
'import/prefer-default-export': 'off',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal'],
'newlines-between': 'never',
alphabetize: {
order: 'asc',
caseInsensitive: true,
},
},
],
'no-async-promise-executor': 'off',
'no-console': ['warn', { allow: ['info', 'warn', 'error'] }],
'no-loop-func': 'off',
'no-restricted-syntax': 'off',
'no-shadow': 'off',
'no-unused-expressions': ['error', { allowShortCircuit: true }],
'no-unused-vars': 'error',
'no-use-before-define': 'error',
'prefer-destructuring': ['error', { object: true, array: false }],
'react/destructuring-assignment': 'error',
'react/display-name': 'off',
'react/forbid-prop-types': 'off',
'react/jsx-closing-bracket-location': 1,
'react/jsx-first-prop-new-line': [1, 'multiline'],
'react/jsx-filename-extension': 'off',
'react/jsx-wrap-multilines': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-indent-props': [2, 2],
'react/no-unescaped-entities': 'off',
'react/require-default-props': 'off',
'react/react-in-jsx-scope': 'off',
'comma-dangle': ['error', 'always-multiline'],
semi: ['error', 'never'],
quotes: ['error', 'single'],
strict: ['error', 'global'],
'unicorn/filename-case': 'error',
requireConfigFile: 0,
}
const otherConfigs = {
env: {
browser: true,
es6: true,
},
extends: ['airbnb', 'prettier'],
parserOptions: {
ecmaVersion: 2021,
requireConfigFile: false,
},
plugins: ['import', 'unicorn', 'react'],
settings: {
'import/resolver': {
node: {
paths: ['.'],
},
},
},
}
module.exports = {
rules,
...otherConfigs,
}