-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.cjs
94 lines (94 loc) · 2.63 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
jest: true,
},
extends: [
'google',
'eslint:recommended',
'plugin:jsdoc/recommended',
],
overrides: [{
files: ['*.js', '*.mjs'],
}],
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
plugins: [
'@babel/syntax-import-assertions',
],
},
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: [
'import',
'jsdoc',
],
rules: {
'import/newline-after-import': ['error', {count: 2}],
'max-len': ['error', 140],
'no-irregular-whitespace': ['error'],
'no-trailing-spaces': ['error'],
'prefer-rest-params': 'off',
'quote-props': ['error', 'consistent-as-needed'],
'semi': ['error', 'never'],
'arrow-spacing': ['error', {before: true, after: true}],
'space-infix-ops': ['error'],
'curly': ['error', 'all'],
'default-case': 'error',
'default-param-last': ['error'],
'eqeqeq': ['error', 'always'],
'no-alert': 'error',
'no-empty-function': 'error',
'no-eq-null': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-invalid-this': 'error',
'no-lone-blocks': 'error',
'no-lonely-if': 'error',
'no-loop-func': 'error',
'no-mixed-operators': 'error',
'no-magic-numbers': ['error', {ignore: [-1, 0, 1], ignoreArrayIndexes: true, ignoreDefaultValues: true}],
'no-multi-assign': ['error', {ignoreNonDeclaration: true}],
'no-return-assign': 'error',
'no-shadow': 'error',
'no-undef-init': 'error',
'no-unneeded-ternary': 'error',
'no-unused-expressions': 'error',
'no-useless-call': 'error',
'no-useless-computed-key': 'error',
'no-useless-concat': 'error',
'no-useless-constructor': 'error',
'no-useless-return': 'error',
'prefer-const': 'error',
'prefer-template': 'error',
'yoda': 'error',
'arrow-parens': ['error', 'always'],
'block-spacing': 'error',
'brace-style': 'error',
'comma-style': ['error', 'last'],
'eol-last': ['error', 'always'],
'func-call-spacing': ['error', 'never'],
'no-multiple-empty-lines': ['error', {max: 2, maxEOF: 1}],
'valid-jsdoc': 'off',
'jsdoc/newline-after-description': 'error',
'jsdoc/check-types': 'error',
'jsdoc/require-param-description': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/check-param-names': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-param-type': 'off',
'require-await': 'error',
},
settings: {
jsdoc: {
tagNamePreference: {
'returns': 'return',
},
},
},
reportUnusedDisableDirectives: true,
}