-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
33 lines (33 loc) · 1.11 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
module.exports = {
root: true,
env: {
es2022: true,
node: true,
},
extends: ['semistandard', 'plugin:import/recommended', 'plugin:sonarjs/recommended', 'plugin:promise/recommended', 'prettier'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
// turn off some stricter rules for flexibility
'global-require': 'off',
'import/no-extraneous-dependencies': 'off',
'import/prefer-default-export': 'off',
'no-template-curly-in-string': 'off',
'no-console': 'off',
'func-names': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }], // allow _ as ignored params
'sort-imports': 'off', // turned off in favour of import/order rule
'import/order': [
'error',
{
'newlines-between': 'ignore',
// enforce import ordering
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
},
],
},
// 'only-warn' plugin turns all errors and warnings reported by eslint into warnings so that its easier to check in CI env
plugins: ['only-warn', 'import', 'sonarjs', 'promise'],
};