{ "env": { "es6": true, // TODO Configure this in the `test` folder, not globally "mocha": true }, "rules": { // full documentation here : http://eslint.org/docs/rules // Possible errors "comma-dangle": [2, "never"], // don't let a comma at the end of object properties or array element "no-cond-assign": [2, "always"], // no assignments in conditional statements "no-console": true, // no console.log() statements in production code "no-constant-condition": true, // no constants in conditional statements "no-control-regex": true, // no control characters in regex's "no-debugger": true, // no debugger in productin code "no-dupe-args": true, // no duplicated arguments in functions "no-dupe-keys": true, // no duplicated keys when creating object literals "no-duplicate-case": true, // no duplicated `case` in `switch` statements "no-empty": true, // no empty blocks "no-empty-class": true, // no empty character class in regex's "no-ex-assign": true, // do not assign any value to an Exception raised "no-extra-boolean-cast": true, // do not use !!falseExpression to cast to boolean "no-extra-parens": true, // do not use extra parenthesis "no-extra-semi": true, // do not use extra semicolons "no-func-assign": true, // do not overwrite variables declared as functions "no-inner-declarations": [2, "both"], // only declare var's and funct's on function scope "no-invalid-regexp": true, // validates string arguments passed to RegExp constructor "no-irregular-whitespace": true, // detects special characters used as spaces "no-negated-in-lhs": true, // do not use negation in the left operand in an `in` expression "no-obj-calls": true, // prevent calling global objects as if they were functions "no-regex-spaces": true, // do not use multiple spaces in regex's "no-reserved-keys": true, // do not use reserved words as object literal keys "no-sparse-arrays": true, // do not use sparse arrays (empty elements) "no-unreachable": true, // detects unreachable statements (after return, throw,...) "use-isnan": true, // do not compare with `NaN` value, use isNan() instead "valid-jsdoc": true, // ensure JSDoc comments are valid "valid-typeof ": true, // ensure that typeof is used correctly (compared to right string value) // Best practices "block-scoped-var": false, // "complexity": [1, ] // http://eslint.org/docs/rules/complexity.html "consistent-return": true, // require return statements to always or never specify values (do not mix them) "curly": true, // specify curly braces for all control statements // "default-case": "dot-notation": true, // recommends use of dot notation wherever possible "eqeqeq": true, "guard-for-in": true, // make sure for-in loops have an if statement "no-alert": true, // disallow the use of alert, confirm or prompt // "no-caller": // "no-div-regex": "no-else-return": true, // disallow else after a return in an if block // "no-empty-label": "no-eq-null": true, // force comparisons to null with === "no-eval": true, // disallow the use of eval() "no-extend-native": true, // disallow extend native objects (Object.prototype ...) "no-extra-bind": true, // disallow unnecessary funciton binding "no-fallthrough": true, // disallow fallthrough of case statements (case sttmnts without break) "no-floating-decimal": true, // disallow numbers such as .7 2. -.5 etc "no-implied-eval": true, // disallow eval()-like methods "no-iterator": true, // disallow use of __iterator__ property "no-labels": true, "no-lone-blocks": true, // disallow unnecessary nested blocks "no-loop-func": true, // disallow creation of functions within loops "no-multi-spaces": true, "no-multi-str": true, "no-native-reassign": true, "no-new": true, // disallow use of new operator when not part of the assignment "no-new-func": true, // disallow use new Function(...) "no-new-wrappers": true, // disallow new instances of String, Number and Boolean "no-octal": true, "no-octal-escape": true, "no-process-env": true, // disallow use of process.env (commonly in NodeJS) "no-proto": true, // disallow use of __proto__ property "no-redeclare": true, // disallow multiple declarations of the same variable "no-return-assign": true, // disallow assignments in return statements // "no-script-url": // "no-self-compare": "no-sequences": true, // disallow the use of the comma operator "no-throw-literal": true, // restricts what can be thrown as an exception "no-unused-expressions": true, "no-void": true, "no-warning-comments": false, "no-with": true, "radix": true, // forse use of second argument for parseInt() "vars-on-top": true, "wrap-iife": true, "yoda": [2, "never"], // Strict mode "no-extra-strict": false, "strict": [2, "function"], // Variables "no-catch-shadow": true, "no-delete-var": true, "no-label-var": true, "no-shadow": true, // disallow declaration of variables already declared in the outer scope "no-shadow-restricted-names": true, // disallow shadowing names such as arguments "no-undef": true, // disallow use of undeclared variables (unless in a /*global */ comment) "no-undef-init": true, // disallow use of undefined when initializing vars "no-undefined": true, // disallow use of "undefined" variable "no-unused-vars": true, "no-use-before-define": true, // Node.js // "handle-callback-err": // "no-mixed-requires": "no-new-require": true, "no-path-concat": true, // disallow concat string with __dirname or __filename, use path.join() or path.resolve() instead "no-process-exit": true, // "no-restricted-modules": // "no-sync": // Stylistic issues "indent": [2, 4], // 4 spaces of indentation "brace-style": [2, "1tbs", { "allowSingleLine": true }], // one true brace style :D "camelcase": true, "comma-spacing": [2, { "before": false, "after": true }], "comma-style": [2, "last"], "consistent-this": [1, "self"], // the only allowed alias for this is self "eol-last": true, "func-names": true, // disallow use of anonymous functions "func-style": [2, "declaration"], // disallow declaring functions with expressions, such as var foo = function () {} "key-spacing": [2, { "beforeColon": false, "afterColon": true }], "max-nested-callbacks": [2, 3], // disallow more than 3 nested callbacks "new-cap": true, // require capital letter for constructors "new-parens": true, // forces the use of parenthesis when calling constructors, even if they have no arguments "no-array-constructor": true, // disallow the use of Array constructor "no-inline-comments": false, // allow inline comments after some code "no-lonely-if": true, // disallow an if as the only statement in an else block (replace with else-if statement) "no-mixed-spaces-and-tabs": true, "no-multiple-empty-lines": true, "no-nested-ternary": true, "no-new-object": true, // "no-space-before-semi": "no-spaced-func": true, // force function calls like fn() instead of fn () // "no-ternary": "no-trailing-spaces": true, "no-underscore-dangle": true, "no-wrap-func": true, // disallow wrapping of non-IIFE functions "one-var": true, "operator-assignment": [2, "always"], // forces write x += 1 instead of x = x + 1 // "padded-blocks": // "quote-props": "quotes": [2, "single"], "semi": [2, "always"], "semi-spacing": [2, { "before": false, "after": true }], "sort-vars": false, // "space-after-function-name": "space-after-keywords": [2, "always"], "space-before-blocks": [2, "always"], "space-before-function-parentheses": [2, { "anonymous": "always", "named": "never" }], "space-in-brackets": [2, "always"], "space-in-parens": [2, "never"], "space-infix-ops": true, "space-return-throw-case": true, "space-unary-ops": [2, { "words": true, "nonwords": false }], "spaced-line-comment": [2, "always"], "wrap-regex": true, // ECMAScript 6 "no-var": true, "generator-star-spacing": [2, "before"], // Legacy "max-depth": [1, 3], "max-len": [1, 100], "max-params": [1, 3], "max-statements": [1, 10], "no-bitwise": true, "no-plusplus": false, }, "globals": { "expect": true, "module": true, "require": true }, "ecmaFeatures": { "arrowFunctions": true, "binaryLiterals": false, "blockBindings": true, "classes": true, "defaultParams": false, "destructuring": false, "forOf": false, "generators": true, "modules": true, "objectLiteralComputedProperties": false, "objectLiteralDuplicateProperties": false, "objectLiteralShorthandMethods": false, "objectLiteralShorthandProperties": false, "octalLiterals": false, "regexUFlag": false, "regexYFlag": false, "spread": false, "superInFunctions": false, "templateStrings": false, "unicodeCodePointEscapes": false, "globalReturn": false, "jsx": false } }