-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
42 lines (41 loc) · 1.31 KB
/
eslint.config.js
File metadata and controls
42 lines (41 loc) · 1.31 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
const js = require('@eslint/js');
const globals = require('globals');
const importPlugin = require('eslint-plugin-import');
const sonarjs = require('eslint-plugin-sonarjs');
module.exports = [
js.configs.recommended,
importPlugin.flatConfigs.recommended,
sonarjs.configs.recommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'commonjs',
globals: {
...globals.node,
...globals.mocha
}
},
rules: {
'no-console': ['off'],
indent: ['error', 4],
'max-len': ['error', { code: 140 }],
'no-multiple-empty-lines': ['error', { max: 2 }],
'no-var': ['warn'],
'prefer-rest-params': ['warn'],
'vars-on-top': ['warn'],
'no-param-reassign': ['off'],
'no-use-before-define': ['off'],
'newline-per-chained-call': ['off'],
'comma-dangle': ['error', 'never'],
'linebreak-style': ['off'],
quotes: ['error', 'single'],
'sonarjs/cognitive-complexity': ['error', 40],
'no-unused-vars': ['error', { args: 'none', caughtErrors: 'none' }]
}
},
{
linterOptions: {
reportUnusedDisableDirectives: 'off'
}
}
];