@@ -14,18 +14,10 @@ module.exports = {
14
14
] ,
15
15
plugins : [ '@typescript-eslint' , 'prettier' , 'import' , 'promise' , 'unused-imports' ] ,
16
16
rules : {
17
- 'prettier/prettier' : [
18
- 'warn' ,
19
- {
20
- singleQuote : true ,
21
- trailingComma : 'all' ,
22
- printWidth : 100 ,
23
- } ,
24
- ] ,
17
+ '@typescript-eslint/no-explicit-any' : 'off' ,
25
18
'import/named' : 'off' ,
26
19
'import/no-unresolved' : 'off' ,
27
- 'unused-imports/no-unused-imports' : 'error' ,
28
- '@typescript-eslint/no-explicit-any' : 'off' ,
20
+ 'import/no-dynamic-require' : 'error' ,
29
21
'import/order' : [
30
22
'warn' ,
31
23
{
@@ -44,5 +36,43 @@ module.exports = {
44
36
} ,
45
37
} ,
46
38
] ,
39
+ 'no-restricted-globals' : [
40
+ 'error' ,
41
+ {
42
+ name : '__dirname' ,
43
+ message : 'Not available in JavaScript' ,
44
+ } ,
45
+ {
46
+ name : '__filename' ,
47
+ message : 'Not available in JavaScript' ,
48
+ } ,
49
+ {
50
+ name : 'Buffer' ,
51
+ message :
52
+ "'Buffer' unavailable in JavaScript. Use 'Uint8Array' instead. For Base64, use helpers in src/obfuscation.ts" ,
53
+ } ,
54
+ {
55
+ name : 'clearImmediate' ,
56
+ message : "'clearImmediate' unavailable in JavaScript. Use 'setTimeout(fn, 0)' instead" ,
57
+ } ,
58
+ {
59
+ name : 'process' ,
60
+ message :
61
+ "'process' unavailable in JavaScript. If this is already defined in webpack.config.js, you can safely disable the error for this line." ,
62
+ } ,
63
+ {
64
+ name : 'setImmediate' ,
65
+ message : 'Not available in JavaScript.' ,
66
+ } ,
67
+ ] ,
68
+ 'prettier/prettier' : [
69
+ 'warn' ,
70
+ {
71
+ singleQuote : true ,
72
+ trailingComma : 'all' ,
73
+ printWidth : 100 ,
74
+ } ,
75
+ ] ,
76
+ 'unused-imports/no-unused-imports' : 'error' ,
47
77
} ,
48
78
} ;
0 commit comments