-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·65 lines (64 loc) · 1.53 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
const ERROR = 2;
const WARN = 1;
const OFF = 0;
module.exports = {
root: true,
env: {
es6: true,
node: true,
jest: true,
},
extends: [
'airbnb-base',
'plugin:jest/recommended',
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:node/recommended',
'plugin:security/recommended',
'prettier',
],
plugins: ['node', 'security', 'prettier', 'jest'],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 11,
sourceType: 'module',
},
rules: {
'prettier/prettier': ERROR,
'class-methods-use-this': [ERROR, { exceptMethods: ['willSendRequest'] }],
'func-names': ERROR,
'function-paren-newline': OFF,
'global-require': OFF,
'import/no-unresolved': OFF,
'max-len': ERROR,
'no-param-reassign': [ERROR, { props: false }],
'no-underscore-dangle': OFF,
camelcase: OFF,
'no-unused-vars': [ERROR, { skipShapeProps: true }],
'node/no-unsupported-features/es-syntax': [ERROR, { ignores: ['modules'] }],
'security/detect-object-injection': OFF,
'no-console': OFF,
'security/detect-non-literal-fs-filename': OFF,
'jest/no-commented-out-tests': OFF,
},
overrides: [
{
files: ['./src/config/index.js'],
rules: {
'max-len': OFF,
},
},
{
files: ['./src/test/**/*.js'],
rules: {
'import/no-extraneous-dependencies': OFF,
'node/no-unpublished-import': OFF,
},
},
],
};