-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (50 loc) · 1.26 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
module.exports = {
env: {
es2020: true,
browser: true,
node: true,
jest: true
},
extends: ['airbnb-base', 'plugin:prettier/recommended'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
settings: {
'import/resolver': {
node: {
moduleDirectory: ['node_modules', 'src']
}
}
},
rules: {
camelcase: 1,
'max-len': [
'warn',
{
code: 80,
tabWidth: 2,
comments: 80,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreRegExpLiterals: true
}
],
'no-console': ['warn', { allow: ['error'] }],
'no-multiple-empty-lines': ['warn', { max: 2 }],
'no-unused-vars': 2,
'no-func-assign': 0,
'no-nested-ternary': 1,
'no-restricted-syntax': 0,
'no-continue': 0
}
}
// https://github.com/eslint/eslint
// https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-file-formats
// https://eslint.org/docs/rules/no-console
// https://eslint.org/docs/rules/
// https://eslint.org/docs/user-guide/configuring/rules#rules
// https://eslint.org/docs/user-guide/command-line-interface#fixing-problems