-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
48 lines (47 loc) · 1.23 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
// https://astexplorer.net/
// https://eslint.org/docs/latest/extend/selectors
module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@jshooks-eslint-rules',
'@typescript-eslint',
],
ignorePatterns: [
"@jshooks-eslint-rules/**",
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended'
],
overrides: [
{
files: ["*.d.ts"],
rules: {
"@typescript-eslint/no-unused-vars": "off",
},
},
],
rules: {
'no-restricted-globals': ['error',
'setTimeout',
'setInterval',
'eval',
'Promise',
// 'Function',
],
'no-restricted-syntax': ['error',
// 'FunctionExpression',
'WithStatement',
// 'FunctionDeclaration',
// 'CallExpression[callee.name="require"]',
'CallExpression[callee.name="setTimeout"]',
'CallExpression[callee.name="setInterval"]',
// 'ImportDeclaration'
],
'@typescript-eslint/no-unused-vars': ['error', { "varsIgnorePattern": "^Hook|Callback$" }],
// '@jshooks-eslint-rules/no-restricted-arrow-functions': 'error',
'@jshooks-eslint-rules/no-restricted-arrow-functions': 'off', // WIP
'no-redeclare': 'off',
// 'no-restricted-imports': 'off',
},
}