-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
85 lines (84 loc) · 1.92 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
env: {
browser: false,
commonjs: true,
es2021: true
},
extends: [
'standard',
'plugin:security/recommended',
'plugin:require-path-exists/recommended',
'plugin:jsdoc/recommended'
],
plugins: [
'security',
'require-path-exists',
'jsdoc'
],
overrides: [
],
ignorePatterns: [
'node_modules',
'build',
'package-lock.json',
'package.json',
'*.json',
'logs/',
'*.log',
'*.prisma',
'*.dbml',
'*.sol'
],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
semi: [2, 'always'],
'func-call-spacing': [2, 'never'],
'keyword-spacing': [2, {
before: false,
after: false,
overrides: {
catch: { before: true, after: false },
const: { before: false, after: true },
return: { before: true, after: true },
case: { before: false, after: true },
else: { before: true, after: false },
async: { before: false, after: true },
of: { before: true, after: true },
continue: { before: true, after: false },
throw: { before: true, after: true },
await: { before: true, after: true },
break: { before: true, after: false },
finally: { before: true, after: false }
}
}],
'space-before-blocks': [2, 'always'],
'newline-before-return': 2,
'eol-last': [2, 'never'],
indent: ['error', 'tab'],
'no-tabs': 0,
camelcase: 0,
'prefer-regex-literals': 0,
'no-useless-escape': 0,
'no-unused-vars': ['error', { args: 'none' }],
'n/no-callback-literal': 0,
'space-before-function-paren': ['error', {
anonymous: 'never',
named: 'never',
asyncArrow: 'always'
}],
'no-return-assign': 0,
'security/detect-object-injection': 0,
'max-params': ['error', 4],
'no-new': 0,
'no-param-reassign': ['error', { props: false }],
'jsdoc/no-defaults': 0
}
};
/*
Classes should use PascalCase
Functions should use camelCase
Variables should use camelCase
Constants should use SCREAMING_SNAKE_CASE (only very important constants)
*/