Repository navigation
Expand file tree
/
Copy patheslint.config.js
More file actions
56 lines (55 loc) · 1.81 KB
/
Copy patheslint.config.js
File metadata and controls
56 lines (55 loc) · 1.81 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
import security from 'eslint-plugin-security';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: ['dist/**', 'node_modules/**', 'coverage/**']
},
...tseslint.configs.recommended,
{
files: ['src/**/*.{ts,tsx,js,jsx}'],
plugins: { security },
rules: {
'security/detect-object-injection': 'off',
'security/detect-non-literal-regexp': 'warn',
'security/detect-unsafe-regex': 'error',
'security/detect-buffer-noassert': 'error',
'security/detect-child-process': 'error',
'security/detect-disable-mustache-escape': 'error',
'security/detect-eval-with-expression': 'error',
'security/detect-no-csrf-before-method-override': 'error',
'security/detect-possible-timing-attacks': 'warn',
'security/detect-pseudoRandomBytes': 'error',
'no-eval': 'error',
'no-implied-eval': 'error',
'no-new-func': 'error',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-non-null-assertion': 'off'
},
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
fetch: 'readonly',
URL: 'readonly',
URLSearchParams: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
MutationObserver: 'readonly',
Node: 'readonly',
navigator: 'readonly',
location: 'readonly',
XMLHttpRequest: 'readonly',
chrome: 'readonly',
browser: 'readonly',
self: 'readonly',
globalThis: 'readonly'
}
}
}
);