Skip to content

Commit

Permalink
switch from jshint to eslint and adjust JS files to be lint-free..
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgee committed Oct 26, 2015
1 parent cc55779 commit 50ed779
Show file tree
Hide file tree
Showing 34 changed files with 1,575 additions and 1,333 deletions.
250 changes: 250 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
/* https://github.com/eslint/eslint/tree/master/docs/rules */
{
"rules": {

/*
Possible Errors
The follow rules point out areas where you
might have made mistakes.
*/
"comma-dangle": [2, "never"],
"no-cond-assign": 2,
"no-console": 2,
"no-constant-condition": 2,
"no-control-regex": 2,
"no-debugger": 1,
"no-dupe-args": 2,
"no-dupe-keys": 2,
"no-duplicate-case": 2,
"no-empty-character-class": 2,
"no-empty": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
"no-extra-semi": 2,
"no-func-assign": 2,
"no-inner-declarations": 2,
"no-invalid-regexp": 2,
"no-irregular-whitespace": 2,
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
"no-sparse-arrays": 2,
"no-unexpected-multiline": 2,
"no-unreachable": 2,
"use-isnan": 2,
"valid-jsdoc": 2,
"valid-typeof": 2,

// ignored possible errors
"no-extra-parens": 0,


/*
Best Practices
These are rules designed to prevent you from making
mistakes. They either prescribe a better way of
doing something or help you avoid footguns.
*/
"accessor-pairs": [2, {
"getWithoutSet": true
}],
"block-scoped-var": 2,
"complexity": [2, 20], /** TODO should try to get this lower **/
"consistent-return": 2,
"curly": 2,
"default-case": 2,
"dot-location": [2, "property"],
"dot-notation": 2,
"eqeqeq": 2,
"guard-for-in": 2,
"no-alert": 2,
"no-caller": 2,
"no-div-regex": 2,
"no-empty-label": 2,
"no-empty-pattern": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-fallthrough": 2,
"no-floating-decimal": 2,
"no-implicit-coercion": 2,
"no-implied-eval": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multi-spaces": 2,
"no-multi-str": 2,
"no-native-reassign": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-new": 2,
"no-octal-escape": 2,
"no-octal": 2,
"no-process-env": 2,
"no-proto": 2,
"no-redeclare": 2,
"no-return-assign": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-useless-concat": 2,
"no-void": 2,
"no-with": 2,
"radix": 2,
"wrap-iife": [2, "inside"],
"yoda": 2,

// ignored best practices rules
"no-else-return": 0,
"no-invalid-this": 0,
"no-magic-numbers": 0,
"no-param-reassign": 0,
"no-warning-comments": 0,
"vars-on-top": 0,


/*
Strict Mode
*/
"strict": 2,


/*
Variables
These rules have to do with variable declarations.
*/
"no-catch-shadow": 2,
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow-restricted-names": 2,
"no-shadow": 2,
"no-undef-init": 2,
"no-undef": 2,
"no-unused-vars": 2,
"no-use-before-define": 2,

// ignore variable rules
"init-declarations": 0,
"no-undefined": 0,


/*
Stylistic Issues
These rules are purely matters of style and
are quite subjective.
*/
"array-bracket-spacing": [2, "never"],
"block-spacing": [2, "always"],
"brace-style": [2, "1tbs", {
"allowSingleLine": false
}],
"camelcase": 2,
"comma-spacing": [2, {
"before": false,
"after": true
}],
"comma-style": 2,
"computed-property-spacing": [2, "never"],
"consistent-this": [2, "self"],
"constructor-super": 2,
"func-style": [2, "declaration"],
"id-match": [2, "^[a-z]+([A-Z][a-z]+)*$", {"properties": true}],
"indent": [2, 4],
"key-spacing": [2, {
"beforeColon": false,
"afterColon": true,
"mode": "strict"
}],
"max-nested-callbacks": [2, 4],
"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 2,
"no-continue": 2,
"no-lonely-if": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": 2,
"object-curly-spacing": [2, "never"],
"operator-assignment": 2,
"operator-linebreak": 2,
"quotes": [2, "single"],
"semi-spacing": [2, {
"before": false,
"after": true
}],
"semi": [2, "always"],
"space-after-keywords": [2, "always"],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "always"],
"space-before-keywords": [2, "always"],
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
"space-return-throw-case": 2,
"wrap-regex": 2,

// ignored stylistic rules
"eol-last": 0,
"func-names": 0,
"id-match": 0,
"jsx-quotes": 0,
"lines-around-comment": 0,
"linebreak-style": 0,
"newline-after-var": 0,
"no-inline-comments": 0,
"no-negated-condition": 0,
"no-underscore-dangle": 0,
"one-var": 0,
"padded-blocks": 0,
"quote-props": 0,
"require-jsdoc": 0,
"space-unary-ops": 0,
"spaced-comment": 0,


/*
ECMAScript 6
These rules are only relevant to ES6 environments.
*/
"arrow-parens": [2, "always"],
"arrow-spacing": [2, {
"before": true,
"after": true
}],
"constructor-super": 2,
"generator-star-spacing": [2, {
"before": true,
"after": true
}],
"no-class-assign": 2,
"no-const-assign": 2,
"no-dupe-class-members": 2,
"no-this-before-super": 2,
"prefer-const": 2,
"prefer-spread": 2,
"require-yield": 2,

// ignored ECMA6 rules
"no-arrow-condition": 0,
"no-var": 0,
"object-shorthand": 0,
"prefer-arrow-callback": 0,
"prefer-reflect": 0,
"prefer-template": 0

},
"env": {
"amd": true,
"es6": true,
"browser": true
},
"globals": {
"define": false,
"require": false
},
"parser": "babel-eslint",
"extends": "eslint:recommended"
}
102 changes: 0 additions & 102 deletions .jshintrc

This file was deleted.

Loading

0 comments on commit 50ed779

Please sign in to comment.