byronhulcher/tarot-deck

View on GitHub
.eslintrc

Summary

Maintainability
Test Coverage
{
  "parser": "babel-eslint",
  "env": {
    "browser": true,
    "commonjs": true,
    "mocha": true,
    "es6": true,
  },
  // add global vars for chai, etc
  "globals": {
    "expect": false,
    "chai": false,
    "sinon": false
  },
  // enable the es6 features supported by babel
  "ecmaFeatures": {
    "arrowFunctions": true,
    "blockBindings": true,
    "defaultParams": true,
    "destructuring": true,
    "forOf": true,
    "generators": true,
    "modules": true,
    "objectLiteralComputedProperties": true,
    "objectLiteralDuplicateProperties": true,
    "objectLiteralShorthandMethods": true,
    "objectLiteralShorthandProperties": true,
    "regexUFlag": true,
    "regexYFlag": true,
    "restParams": true,
    "spread": true,
    "templateStrings": true,
    "unicodeCodePointEscapes": true
  },
  "rules": {
    // possible errors
    "no-extra-parens": [1,"functions"],
    "valid-jsdoc": [1, {
      "requireReturn": false,
      "requireParamDescription": false,
      "requireReturnDescription": false
    }],
    // best practices
    "complexity": [2, 8],
    "default-case": 2,
    "guard-for-in": 2,
    "no-alert": 1,
    "no-floating-decimal": 1,
    "no-self-compare": 2,
    "no-throw-literal": 2,
    "no-void": 2,
    "vars-on-top": 2,
    "wrap-iife": 2,
    // strict mode
    "strict": [2, "never"],
    // variables
    "no-unused-vars": 2,
    // node.js
    "handle-callback-err": [2, "^.*(e|E)rr"],
    "no-mixed-requires": 0,
    "no-new-require": 2,
    "no-path-concat": 2,
    // stylistic issues
    "brace-style": [2, "1tbs", { "allowSingleLine": true }],
    "comma-style": [2, "last"],
    "indent": [2, 2, { "SwitchCase": 1 ,"VariableDeclarator": 1}],
    "max-nested-callbacks": [2, 4],
    "newline-after-var": [2, "always"],
    "no-nested-ternary": 2,
    "no-spaced-func": 0,
    "no-trailing-spaces": 2,
    "no-underscore-dangle": 0,
    "no-unneeded-ternary": 1,
    "one-var": 0,
    "quotes": [2, "single", "avoid-escape"],
    "semi": [2, "always"],
    "space-before-blocks": [2, "always"],
    "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
    "space-infix-ops": [1, {"int32Hint": false}],
    "spaced-comment": [2, "always"],
    // es6
    "generator-star-spacing": [2, "before"],
    // legacy jshint rules
    "max-depth": [2, 4],
    "max-params": [2, 4]
  }
}