Skip to content

Commit

Permalink
Add eslint configuration and attempt to get project mostly passing
Browse files Browse the repository at this point in the history
This should not introduct any functionality changes, the intention is
purely to clean up the code
This is done in one commit because it's mostly a huge amount of
whitespace changes
  • Loading branch information
William Brockhus committed Oct 2, 2017
1 parent 2db7a8b commit 2192d13
Show file tree
Hide file tree
Showing 11 changed files with 1,798 additions and 1,567 deletions.
204 changes: 204 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"parserOptions": {
"ecmaVersion": 2017
},
"env": {
"browser": true,
"es6": true
},
"globals": {
"jQuery": false,
"chrome": false
},
"rules": {
"no-restricted-globals": ["error", "event"],
"no-control-regex": "off",
"no-extra-parens": "off",
"no-regex-spaces": "off",
"valid-jsdoc": ["warn", { "prefer": { "arg": "param", "argument": "param", "class": "constructor", "return": "returns", "virtual": "abstract" }, "requireReturn": false }],
"accessor-pairs": "off",
"complexity": "off",
"consistent-return": "off",
"dot-notation": "off",
"no-empty-label": "off",
"no-extend-native": "off",
"no-multi-spaces": "off",
"no-multi-str": "off",
"strict": "off",
"init-declarations": "off",
"no-catch-shadow": "off",
"callback-return": "off",
"handle-callback-err": "off",
"no-mixed-requires": "off",
"no-new-require": "off",
"no-path-concat": "off",
"no-process-exit": "off",
"no-restricted-modules": "off",
"no-sync": "off",
"array-bracket-spacing": ["warn", "never",{}],
"brace-style": ["warn", "1tbs",{"allowSingleLine": true}],
"camelcase": ["off"],
"comma-spacing": ["warn", {"after": true}],
"comma-style": ["warn", "last"],
"computed-property-spacing": ["warn", "never"],
"consistent-this": "off",
"eol-last": "warn",
"func-names": "off",
"func-style": "off",
"id-length": "off",
"indent": ["warn", 2, {"SwitchCase": 1, "MemberExpression": "off", "CallExpression": {"arguments": "off"}}],
"key-spacing": ["warn", {"align": {"beforeColon": true, "afterColon": true, "on": "colon"}, "multiLine": { "beforeColon": false, "afterColon": true}}],
"lines-around-comment": "off",
"linebreak-style": ["warn", "unix"],
"max-nested-callbacks": "off",
"new-cap": "off",
"new-parens": "warn",
"no-array-constructor": "warn",
"no-continue": "off",
"no-inline-comments": "off",
"no-lonely-if": "warn",
"no-mixed-spaces-and-tabs": "warn",
"no-multiple-empty-lines": ["warn", {"max":2}],
"no-nested-ternary": "warn",
"no-new-object": "warn",
"func-call-spacing": "error",
"no-ternary": "off",
"no-trailing-spaces": "warn",
"no-underscore-dangle": "off",
"no-unneeded-ternary": "warn",
"object-curly-spacing": ["warn", "never", {"arraysInObjects": true, "objectsInObjects": true}],
"one-var": ["error", "never"],
"operator-assignment": ["warn", "always"],
"operator-linebreak": ["warn", "before"],
"padded-blocks": "off",
"quote-props": ["error", "consistent-as-needed"],
"quotes": ["warn", "single"],
"id-match": "off",
"semi-spacing": ["error", {"before": false, "after": true}],
"sort-vars": "off",
"keyword-spacing": ["warn", {"before": true, "after": true}],
"space-before-blocks": ["warn", "always"],
"space-before-function-paren": ["warn", {"anonymous": "always", "named": "never"}],
"space-in-parens": ["warn", "never"],
"space-infix-ops": "warn",
"space-return-throw-case": "off",
"space-unary-ops": ["warn", {"words": true, "nonwords": false}],
"spaced-comment": ["warn", "always", {"line": {"markers": [], "exceptions": []}, "block": {"markers": [], "exceptions": [], "balanced": true}}],
"wrap-regex": "warn",
"arrow-parens": "warn",
"arrow-spacing": ["warn", { "before": true, "after": true }],
"constructor-super": "error",
"generator-star-spacing": ["warn", {"before": true, "after": false}],
"no-class-assign": "warn",
"no-const-assign": "error",
"no-this-before-super": "error",
"no-var": "off",
"object-shorthand": "off",
"prefer-const": "off",
"prefer-spread": "off",
"require-yield": "warn",
"max-depth": "off",
"max-len": "off",
"max-params": "off",
"max-statements": "off",
"no-bitwise": "off",
"no-plusplus": "off",
"comma-dangle": ["error", "always-multiline"],
"no-cond-assign": ["error", "except-parens"],
"no-console": ["warn", {"allow": ["warn", "error"]}],
"no-constant-condition": "error",
"no-debugger": "warn",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-empty": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-inner-declarations": ["error", "functions"],
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-unsafe-negation": "error",
"no-obj-calls": "error",
"no-sparse-arrays": "error",
"no-unreachable": "error",
"use-isnan": "error",
"valid-typeof": "error",
"no-unexpected-multiline": "error",
"block-scoped-var": "warn",
"curly": ["error", "all"],
"default-case": "error",
"dot-location": ["error", "property"],
"eqeqeq": ["error", "smart"],
"guard-for-in": "error",
"no-alert": "warn",
"no-caller": "error",
"no-div-regex": "error",
"no-else-return": "error",
"no-eq-null": "error",
"no-eval": "error",
"no-extra-bind": "error",
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": ["error", {"boolean":true,"number":true,"string":true}],
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-iterator": "warn",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-global-assign": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-new": "error",
"no-octal-escape": "error",
"no-octal": "error",
"no-param-reassign": "off",
"no-process-env": "error",
"no-proto": "error",
"no-redeclare": ["error", {"builtinGlobals":true}],
"no-return-assign": ["error", "except-parens"],
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unused-expressions": "warn",
"no-useless-call": "error",
"no-void": "off",
"no-warning-comments": "warn",
"no-with": "error",
"radix": "error",
"vars-on-top": "warn",
"wrap-iife": ["error", "outside"],
"yoda": ["error", "never", {"exceptRange":true}],
"no-delete-var": "error",
"no-label-var": "warn",
"no-shadow-restricted-names": "error",
"no-shadow": ["warn", {"builtinGlobals": true, "hoist": "all", "allow": ["event"]}],
"no-undef-init": "warn",
"no-undef": "error",
"no-undefined": "error",
"no-unused-vars": "warn",
"no-use-before-define": "error",
"semi": ["error", "always"],
"no-prototype-builtins": "warn",
"func-name-matching": "warn",
"no-useless-return": "warn",
"prefer-destructuring": "off",
"prefer-promise-reject-errors": "warn",
"no-multi-assign": "off",
"no-unmodified-loop-condition": "warn",
"template-tag-spacing": ["warn", "never"],
"no-compare-neg-zero": "warn",
"array-bracket-newline": ["warn", { "multiline": true }],
"array-element-newline": ["warn", { "multiline": true, "minItems": 1 }],
"object-curly-newline": ["error", { "consistent": true }],
"semi-style": "off",
"padding-line-between-statements": "off",
"for-direction": "error",
"switch-colon-spacing": ["warn", {"after": false, "before": false}],
"no-confusing-arrow": ["error", {"allowParens": true}]
}
}
Loading

0 comments on commit 2192d13

Please sign in to comment.