jibeinc/juice

View on GitHub
.eslintrc

Summary

Maintainability
Test Coverage
{
  "env": {
    "es6": true,
    "jasmine": true,
    "node": true
  },
  "globals": {
    "ROOT_DIR": true,
    "it": false,
    "xit": false,
    "describe": false,
    "xdescribe": false,
    "beforeEach": false,
    "before": false,
    "after": false,
    "afterEach": false,
    "mtShout": true,
    "statsd": false,
    "window": true,
    "document": false,
    "$": false,
    "angular": false,
    "_": true,
    "Spinner": false,
    "Mirror": false,
    "moment": true,
    "alert": false,
    "navigator": false,
    "matchMedia": false,
    "addthis": false,
    "Snap": false,
    "JIBE": true,
    "DateFormatter": true,
    "dateFormat": true
  },
  "parser": "babel-eslint",
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module"
  },
  "rules": {
    "comma-dangle": ["error", "never"],
    "no-cond-assign": "error",
    "no-constant-condition": "error",
    "no-control-regex": "error",
    "no-debugger": "error",
    "no-dupe-args": "error",
    "no-dupe-keys": "error",
    "no-duplicate-case": "error",
    "no-empty": "warn",
    "no-empty-character-class": "error",
    "no-ex-assign": "error",
    //no-extra-boolean-cast
    "no-extra-parens": ["error", "functions"],
    "no-extra-semi": "error",
    "no-func-assign": "error",
    //no-inner-declarations
    "no-invalid-regexp": "error",
    "no-irregular-whitespace": "error",
    "no-negated-in-lhs": "error",
    "no-obj-calls": "error",
    "no-regex-spaces": "error",
    "no-sparse-arrays": "error",
    "no-unexpected-multiline": "error",
    "no-unreachable": "error",
    "use-isnan": "error",
    "valid-jsdoc": ["warn", {
      "requireReturn": false
    }],
    "valid-typeof": "error",
    //accessor-pairs
    "array-callback-return": "error",
    "block-scoped-var": "warn",
    //complexity
    //consistent-return
    "curly": "error",
    "default-case": "error",
    //dot-location
    //dot-notation
    "eqeqeq": "error",
    //guard-for-in
    "no-alert": "error",
    "no-caller": "error",
    //no-case-declarations
    "no-div-regex": "error",
    //no-else-return
    "no-empty-function": "error",
    "no-empty-pattern": "error",
    "no-eq-null": "error",
    //no-eval
    "no-extend-native": "error",
    "no-extra-bind": "error",
    "no-extra-label": "error",
    //no-fallthrough
    "no-floating-decimal": "error",
    "no-implicit-coercion": ["error", { "allow": ["!!"] } ],
    //no-implicit-globals
    "no-implied-eval": "error",
    "no-invalid-this": "error",
    "no-iterator": "error",
    "no-labels": "error",
    "no-lone-blocks": "error",
    "no-loop-func": "warn",
    //no-magic-numbers
    "no-multi-spaces": "error",
    "no-multi-str": "warn",
    "no-native-reassign": "error",
    "no-new": "error",
    "no-new-func": "error",
    "no-new-wrappers": "error",
    "no-octal": "error",
    "no-octal-escape": "error",
    //no-param-reassign
    "no-proto": "warn",
    "no-redeclare": "error",
    "no-return-assign": "warn",
    //no-script-url
    "no-self-assign": "error",
    "no-self-compare": "error",
    "no-sequences": "error",
    "no-throw-literal": "error",
    //no-unmodified-loop-condition
    "no-unused-expressions": "error",
    "no-unused-labels": "error",
    "no-useless-call": "error",
    "no-useless-concat": "error",
    //"no-useless-escape": "error",
    "no-void": "error",
    //no-warning-comments
    "no-with": "error",
    "radix": "error",
    "vars-on-top": "warn",
    "wrap-iife": ["error", "inside"],
    "yoda": "error",
    "strict": ["error", "global"],
    //init-declarations
    "no-catch-shadow": "error",
    "no-delete-var": "error",
    "no-label-var": "error",
    //no-restricted-globals
    "no-shadow": "warn",
    "no-shadow-restricted-names": "error",
    "no-undef": "error",
    "no-undef-init": "error",
    "no-undefined": "error",
    "no-unused-vars": "error",
    "no-use-before-define": "error",
    "callback-return": "warn",
    "global-require": "error",
    "handle-callback-err": "error",
    "no-mixed-requires": "error",
    "no-new-require": "error",
    "no-path-concat": "error",
    //no-process-env
    //Enable after amnesia is gone
    "no-process-exit": "error",
    //no-restricted-modules
    //Enable after Naveed's refactor
    //"no-sync": "error",
    "array-bracket-spacing": ["error", "never"],
    //block-spacing
    "brace-style": "error",
    "camelcase": "error",
    "comma-spacing": ["error", { "before": false, "after": true }],
    "comma-style": ["error", "last"],
    "computed-property-spacing": ["error", "never"],
    //consistent-this
    "eol-last": "error",
    //func-names
    //func-style
    //id-blacklist
    //id-length
    //id-match
    "indent": ["error", 2, {"SwitchCase": 1}],
    //jsx-quotes
    "key-spacing": ["error", {"beforeColon": false, "afterColon": true}],
    "keyword-spacing": "error",
    "linebreak-style": ["error", "unix"],
    "lines-around-comment": "error",
    "max-depth": ["error", 10],
    "max-len": ["error", 160, 4],
    "max-nested-callbacks": ["error", 3],
    //max-params
    //max-statements
    "max-statements-per-line": ["error", { "max": 1 }],
    "new-cap": "error",
    "new-parens": "error",
    //newline-after-var
    //newline-before-return
    "newline-per-chained-call": ["error", {"ignoreChainWithDepth": 3}],
    "no-array-constructor": "error",
    "no-bitwise": "error",
    "no-continue": "error",
    //no-inline-comments
    "no-lonely-if": "error",
    "no-mixed-spaces-and-tabs": "error",
    "no-multiple-empty-lines": ["error", {"max": 1}],
    //no-negated-condition
    "no-nested-ternary": "error",
    "no-new-object": "error",
    //no-plusplus
    //no-restricted-syntax
    "no-spaced-func": "error",
    //no-ternary
    "no-trailing-spaces": "error",
    //no-underscore-dangle
    "no-unneeded-ternary": "error",
    "no-whitespace-before-property": "error",
    "object-curly-spacing": ["error", "never"],
    "one-var": ["error", "never"],
    "one-var-declaration-per-line": ["error", "always"],
    //operator-assignment
    "operator-linebreak": ["error", "after"],
    "padded-blocks": ["error", "never"],
    "quote-props": ["error", "as-needed"],
    "quotes": ["error", "single"],
    "semi": ["error", "always"],
    "semi-spacing": ["error", {"before": false, "after": true}],
    "sort-imports": "error",
    "sort-vars": "error",
    "space-before-blocks": "error",
    //space-before-function-paren
    "space-in-parens": ["error", "never"],
    "space-infix-ops": "error",
    "space-unary-ops": "error",
    "spaced-comment": ["error", "always"],
    //wrap-regex

    //-----JUICE specific for now, everything below this-----
    "require-jsdoc": [1, {
      "require": {
        "FunctionDeclaration": true,
        "MethodDefinition": true,
        "ClassDeclaration": true
      }
    }],
    //ES6 Stuff
    "arrow-parens": 1,
    "arrow-spacing": 1,
    "constructor-super": 1,
    "no-class-assign": 1,
    "no-const-assign": 1,
    "no-dupe-class-members": 1,
    "no-this-before-super": 1,
    "no-var": 1,
    "object-shorthand": 1,
    "prefer-arrow-callback": 1,
    "prefer-const": 1
  }
}