-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathvariables.js
42 lines (31 loc) · 1.16 KB
/
variables.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
/**
* These rules relate to variable declarations
*/
module.exports = {
rules: {
// require or disallow initialization in variable declarations
'init-declarations': 'off',
// disallow shadowing of variables inside of catch
'no-catch-shadow': 'off',
// disallow deleting variables
'no-delete-var': 'error',
// disallow labels that are variables names
'no-label-var': 'error',
// disallow specific global variables
'no-restricted-globals': 'off',
// disallow variable declarations from shadowing variables declared in the outer scope
'no-shadow': 'off',
// disallow shadowing of restricted names
'no-shadow-restricted-names': 'error',
// disallow undeclared variables
'no-undef': 'error',
// disallow initializing to undefined
'no-undef-init': 'error',
// disallow use of undefined variable
'no-undefined': 'error',
// disallow unused variables
'no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: true }],
// disallow use of variables before they are defined
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
}
}