1 | var config = require('./config');
|
2 | var ERROR = config.ERROR;
|
3 | var IGNORE = config.IGNORE;
|
4 |
|
5 | /**
|
6 | * ## Variables
|
7 | *
|
8 | * These rules have to do with variable declarations.
|
9 | *
|
10 | * @see http://eslint.org/docs/rules/#variables
|
11 | */
|
12 | module.exports = {
|
13 | rules: {
|
14 | // enforce or disallow variable initializations at definition
|
15 | 'init-declarations': IGNORE,
|
16 | // disallow the catch clause parameter name being the same as a variable in the outer scope
|
17 | 'no-catch-shadow': IGNORE,
|
18 | // disallow deletion of variables
|
19 | 'no-delete-var': ERROR,
|
20 | // disallow labels that share a name with a variable
|
21 | 'no-label-var': IGNORE,
|
22 | // disallow shadowing of names such as arguments
|
23 | 'no-shadow-restricted-names': ERROR,
|
24 | // disallow declaration of variables already declared in the outer scope
|
25 | 'no-shadow': ERROR,
|
26 | // disallow use of undefined when initializing variables
|
27 | 'no-undef-init': IGNORE,
|
28 | // disallow use of undeclared variables unless mentioned in a /*global */ block
|
29 | 'no-undef': ERROR,
|
30 | // disallow use of undefined variable
|
31 | 'no-undefined': IGNORE,
|
32 | // disallow declaration of variables that are not used in the code
|
33 | 'no-unused-vars': [ERROR, {
|
34 | vars: 'local',
|
35 | args: 'after-used'
|
36 | }],
|
37 | // disallow use of variables before they are defined
|
38 | 'no-use-before-define': ERROR
|
39 | }
|
40 | };
|