1 | ;
|
2 |
|
3 | module.exports = {
|
4 | rules: {
|
5 | // disallow self-assignment
|
6 | "no-self-assign": 2,
|
7 |
|
8 | // disallow declaration of variables already declared in the outer scope
|
9 | "no-shadow": [1, { allow: ["cb", "err"] }],
|
10 |
|
11 | // disallow declaration of restricted keyword names
|
12 | "no-shadow-restricted-names": 2,
|
13 |
|
14 | // disallow use of undeclared variables unless mentioned in a global block
|
15 | "no-undef": 2,
|
16 |
|
17 | // disallow declaration of variables that are not used in the code
|
18 | "no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
|
19 |
|
20 | // disallow use of variables before they are defined
|
21 | "no-use-before-define": [2, { functions: false }],
|
22 | },
|
23 | };
|