-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
95 lines (95 loc) · 2.43 KB
/
index.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
86
87
88
89
90
91
92
93
94
95
module.exports = {
extends: [],
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
globals: {
BigInt: 'readonly',
},
rules: {
curly: 'error',
eqeqeq: ['error', 'always'],
'no-bitwise': ['error'],
'no-fallthrough': [
'error',
{ commentPattern: 'fallthrough is not allowed' },
],
'no-plusplus': ['error'],
'no-restricted-globals': ['error', 'RegExp', 'Date'],
'no-restricted-syntax': [
'error',
{
selector: "BinaryExpression[operator='in']",
message: "'in' is not allowed.",
},
{
selector: "BinaryExpression[operator='instanceof']",
message: "'instanceof' is not allowed.",
},
{
selector: 'NewExpression',
message: "'new' is not allowed.",
},
{
selector: 'FunctionDeclaration[generator=true]',
message: 'generators are not allowed.',
},
{
selector: 'FunctionDeclaration[async=true]',
message: 'async functions are not allowed.',
},
{
selector: 'FunctionExpression[async=true]',
message: 'async functions are not allowed.',
},
{
selector: 'ArrowFunctionExpression[async=true]',
message: 'async functions are not allowed.',
},
{
selector: 'DoWhileStatement',
message: 'do/while statements are not allowed.',
},
{
selector: 'ThisExpression',
message: "'this' not allowed.",
},
{
selector: "UnaryExpression[operator='delete']",
message: "'delete' not allowed.",
},
{
selector: 'ForInStatement',
message: 'for/in statements are not allowed.',
},
{
selector: 'MemberExpression[computed=true]',
message: 'computed property names are not allowed.',
},
{
selector: 'Super',
message: "'super' is not allowed.",
},
{
selector: 'MetaProperty',
message: "'MetaProperty' is not allowed.",
},
{
selector: 'ClassExpression',
message: "'ClassExpression' is not allowed.",
},
{
selector: "CallExpression[callee.name='eval']",
message: "'eval' is not allowed.",
},
{
selector: 'Literal[regex]',
message: 'regexp literal syntax is not allowed.',
},
],
'no-ternary': ['error'],
'no-var': ['error'],
semi: ['error', 'always'],
},
};