-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy path.eslintrc.js
More file actions
59 lines (56 loc) · 1.47 KB
/
Copy path.eslintrc.js
File metadata and controls
59 lines (56 loc) · 1.47 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module.exports = {
root: true,
env: {
node: true,
es2020: true,
jest: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
ignorePatterns: [
'dist/',
'build/',
'node_modules/',
'coverage/',
'.eslintrc.*',
'*.config.js',
'*.config.ts'
],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'security',
'node-security'
],
rules: {
// Security Rules
'security/detect-object-injection': 'error',
'security/detect-possible-timing-attacks': 'error',
// Node.js Security
'node-security/detect-eval-with-expression': 'error',
'node-security/detect-non-literal-fs-filename': 'error',
'node-security/detect-non-literal-require': 'error',
'node-security/detect-possible-timing-attacks': 'error',
'node-security/detect-unsafe-regex': 'error',
// TypeScript recommended rules
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { 'argsIgnorePattern': '^_' }],
// General best practices
'no-console': ['warn', { 'allow': ['warn', 'error', 'info'] }],
'no-debugger': 'error',
'no-alert': 'error',
'no-eval': 'error',
'no-implied-eval': 'error'
},
overrides: [
{
files: ['src/**/*.ts', 'src/**/*.tsx'],
rules: {
'node-security/detect-non-literal-require': 'off'
}
}
]
};