|
| 1 | +{ |
| 2 | + // http://eslint.org/docs/rules/ |
| 3 | + |
| 4 | + "ecmaFeatures": { |
| 5 | + "binaryLiterals": false, // enable binary literals |
| 6 | + "blockBindings": true, // enable let and const (aka block bindings) |
| 7 | + "defaultParams": false, // enable default function parameters |
| 8 | + "forOf": true, // enable for-of loops |
| 9 | + "generators": false, // enable generators |
| 10 | + "objectLiteralComputedProperties": false, // enable computed object literal property names |
| 11 | + "objectLiteralDuplicateProperties": false, // enable duplicate object literal properties in strict mode |
| 12 | + "objectLiteralShorthandMethods": false, // enable object literal shorthand methods |
| 13 | + "objectLiteralShorthandProperties": false, // enable object literal shorthand properties |
| 14 | + "octalLiterals": false, // enable octal literals |
| 15 | + "regexUFlag": false, // enable the regular expression u flag |
| 16 | + "regexYFlag": false, // enable the regular expression y flag |
| 17 | + "templateStrings": true , // enable template strings |
| 18 | + "unicodeCodePointEscapes": false, // enable code point escapes |
| 19 | + "jsx": false, // enable JSX |
| 20 | + "modules": true |
| 21 | + }, |
| 22 | + |
| 23 | + "env": { |
| 24 | + "browser": true, // browser global variables. |
| 25 | + "node": true, // Node.js global variables and Node.js-specific rules. |
| 26 | + "amd": true, // defines require() and define() as global variables as per the amd spec. |
| 27 | + "es6": true // EcmaScript 6 |
| 28 | + }, |
| 29 | + |
| 30 | + "globals": { |
| 31 | + // e.g. "angular": true |
| 32 | + }, |
| 33 | + |
| 34 | + "plugins": [ |
| 35 | + // e.g. "react" (must run `npm install eslint-plugin-react` first) |
| 36 | + ], |
| 37 | + |
| 38 | + "rules": { |
| 39 | + ////////// Possible Errors ////////// |
| 40 | + |
| 41 | + "valid-typeof": 2, // Ensure that the results of typeof are compared against a valid string |
| 42 | + |
| 43 | + |
| 44 | + ////////// Best Practices ////////// |
| 45 | + |
| 46 | + "eqeqeq": 2, // require the use of === and !== |
| 47 | + "no-alert": 2, // disallow the use of alert, confirm, and prompt |
| 48 | + |
| 49 | + ////////// Stylistic Issues ////////// |
| 50 | + |
| 51 | + "eol-last": 2, // enforce newline at the end of file, with no multiple empty lines |
| 52 | + "no-lonely-if": 2, // disallow if as the only statement in an else block (off by default) |
| 53 | + "no-mixed-spaces-and-tabs": 2, // disallow mixed spaces and tabs for indentation |
| 54 | + "no-multiple-empty-lines": 2, // disallow multiple empty lines (off by default) |
| 55 | + "no-trailing-spaces": 2, // disallow trailing whitespace at the end of lines |
| 56 | + |
| 57 | + "quotes": [ |
| 58 | + 2, |
| 59 | + "double" |
| 60 | + ] |
| 61 | + } |
| 62 | +} |
0 commit comments