UNPKG

1.9 kBJavaScriptView Raw
1module.exports = {
2 rules: {
3 // require or disallow initialization in variable declarations
4 // http://eslint.org/docs/rules/init-declarations
5 'init-declarations': 'off',
6
7 // disallow catch clause parameters from shadowing variables in the outer scope
8 // http://eslint.org/docs/rules/no-catch-shadow
9 'no-catch-shadow': 'off',
10
11 // disallow deleting variables
12 // http://eslint.org/docs/rules/no-delete-var
13 'no-delete-var': 'error',
14
15 // disallow labels that share a name with a variable
16 // http://eslint.org/docs/rules/no-label-var
17 'no-label-var': 'error',
18
19 // disallow specified global variables
20 // http://eslint.org/docs/rules/no-restricted-globals
21 'no-restricted-globals': 'off',
22
23 // disallow identifiers from shadowing restricted names
24 // http://eslint.org/docs/rules/no-shadow-restricted-names
25 'no-shadow-restricted-names': 'error',
26
27 // disallow variable declarations from shadowing variables declared in the outer scope
28 // http://eslint.org/docs/rules/no-shadow
29 'no-shadow': 'warn',
30
31 // disallow initializing variables to undefined
32 // http://eslint.org/docs/rules/no-undef-init
33 'no-undef-init': 'error',
34
35 // disallow the use of undeclared variables unless mentioned in /*global */ comments
36 // http://eslint.org/docs/rules/no-undef
37 'no-undef': 'error',
38
39 // disallow the use of undefined as an identifier
40 // http://eslint.org/docs/rules/no-undefined
41 'no-undefined': 'warn',
42
43 // disallow unused variables
44 // http://eslint.org/docs/rules/no-unused-vars
45 'no-unused-vars': ['error', { vars: 'local', args: 'after-used', ignoreRestSiblings: true }],
46
47 // disallow the use of variables before they are defined
48 // http://eslint.org/docs/rules/no-use-before-define
49 'no-use-before-define': ['error', { functions: false, classes: true, variables: true }],
50 },
51};