-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (49 loc) · 1.2 KB
/
index.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
/** @type {import('eslint').Linter.Config} */
module.exports = {
env: {
node: true,
es2022: true,
},
parserOptions: {
sourceType: 'module',
},
extends: [
'eslint:recommended',
'plugin:eslint-comments/recommended',
'plugin:n/recommended',
'plugin:promise/recommended',
'plugin:sonarjs/recommended',
'plugin:prettier/recommended',
],
rules: {
indent: [
'error',
2,
{
SwitchCase: 1,
FunctionDeclaration: {
parameters: 'first',
},
FunctionExpression: {
parameters: 'first',
},
ignoredNodes: ['TemplateLiteral > *'],
},
], // https://stackoverflow.com/a/53094449 https://stackoverflow.com/a/54958527
'prettier/prettier': ['error'],
eqeqeq: 'warn',
'array-callback-return': 'warn',
'eslint-comments/no-unused-disable': 'error',
'eslint-comments/require-description': [
'warn',
{
ignore: ['eslint-enable'],
},
],
'sonarjs/cognitive-complexity': 'warn',
'sonarjs/prefer-immediate-return': 'warn',
'sonarjs/no-redundant-jump': 'warn',
'no-unused-vars': 'warn',
'import/no-named-as-default-member': 'off',
},
};