Permalink
Browse files

Upgrade ESLint to 3.1.1 and revamp the rules.

  • Loading branch information...
1 parent 28c6420 commit 58c7be3713d6ed01bdfb191d7187b03e36386bcf @rgrove committed Jul 23, 2016
Showing with 168 additions and 106 deletions.
  1. +167 −105 .eslintrc.yml
  2. +1 −1 package.json
View
@@ -1,113 +1,175 @@
env:
+ es6: true
node: true
parserOptions:
ecmaVersion: 6
sourceType: module
rules:
- accessor-pairs: 1
- arrow-spacing: [1, {after: true, before: true}]
- block-scoped-var: 2
- brace-style: [1, 1tbs, {allowSingleLine: true}]
- callback-return: [1, [callback, cb, next]]
- constructor-super: 2
- curly: [2, all]
- dot-location: [1, property]
- dot-notation: 1
- eol-last: 1
- eqeqeq: [1, allow-null]
- handle-callback-err: [1, "^(err|error)$"]
- jsx-quotes: [1, prefer-double]
- keyword-spacing: 1
- linebreak-style: [2, unix]
- indent: [1, 2, {SwitchCase: 1}]
- new-parens: 1
- no-alert: 1
- no-caller: 2
- no-case-declarations: 1
- no-class-assign: 1
- no-cond-assign: [1, except-parens]
- no-confusing-arrow: [1, allowParens: true]
- no-const-assign: 2
- no-constant-condition: 1
- no-debugger: 2
- no-delete-var: 1
- no-dupe-args: 2
- no-dupe-class-members: 2
- no-dupe-keys: 2
- no-empty: 1
- no-empty-character-class: 1
- no-empty-function: [1, allow: [arrowFunctions]]
- no-empty-pattern: 1
- no-eval: 2
- no-ex-assign: 1
- no-extend-native: 2
- no-extra-bind: 1
- no-extra-boolean-cast: 1
- no-extra-label: 1
- no-extra-semi: 1
- no-fallthrough: 1
- no-floating-decimal: 1
- no-func-assign: 1
- no-implicit-globals: 1
- no-implied-eval: 2
- no-inner-declarations: 1
- no-invalid-regexp: 2
- no-irregular-whitespace: 2
- no-label-var: 1
- no-labels: 1
- no-mixed-spaces-and-tabs: 2
- no-native-reassign: 2
- no-negated-condition: 1
- no-negated-in-lhs: 2
- no-nested-ternary: 1
- no-new-func: 2
- no-new-object: 1
- no-new-require: 1
- no-new-symbol: 2
- no-new-wrappers: 1
- no-obj-calls: 2
- no-octal: 2
- no-octal-escape: 1
- no-path-concat: 1
- no-process-exit: 1
- no-proto: 2
- no-redeclare: 1
- no-regex-spaces: 1
- no-script-url: 2
- no-self-assign: 1
- no-self-compare: 1
- no-sequences: 1
- no-shadow-restricted-names: 2
- no-spaced-func: 1
- no-sparse-arrays: 1
- no-this-before-super: 2
- no-throw-literal: 2
- no-undef: 2
- no-undef-init: 1
- no-unexpected-multiline: 2
- no-unmodified-loop-condition: 1
- no-unneeded-ternary: 1
- no-unreachable: 1
- no-unused-labels: 1
- no-unused-vars: 1
- no-use-before-define: [2, nofunc]
- no-useless-call: 1
- no-useless-constructor: 1
- no-var: 1
- no-warning-comments: [1, {location: start, terms: [fixme, xxx]}]
- no-whitespace-before-property: 1
- no-with: 2
- object-shorthand: [1, methods]
- one-var: [1, never]
- prefer-rest-params: 1
- prefer-spread: 1
- quotes: 0
- radix: 2
- semi: 1
- space-infix-ops: 1
- space-unary-ops: [1, {words: true, nonwords: false}]
- use-isnan: 1
- valid-typeof: 1
- wrap-iife: [1, any]
+ accessor-pairs: warn
+ arrow-spacing:
+ - warn
+ - after: true
+ before: true
+ block-scoped-var: error
+ brace-style:
+ - warn
+ - 1tbs
+ - allowSingleLine: true
+ callback-return:
+ - warn
+ - [callback, cb, next]
+ constructor-super: error
+ curly:
+ - error
+ - all
+ dot-location:
+ - warn
+ - property
+ dot-notation: warn
+ eol-last: warn
+ eqeqeq:
+ - warn
+ - allow-null
+ handle-callback-err:
+ - warn
+ - "^(err|error)$"
+ keyword-spacing: warn
+ linebreak-style:
+ - error
+ - unix
+ indent:
+ - warn
+ - 2
+ - SwitchCase: 1
+ max-lines:
+ - warn
+ - max: 2000
+ skipBlankLines: true
+ skipComments: true
+ max-statements-per-line:
+ - warn
+ - max: 2
+ new-parens: warn
+ no-alert: warn
+ no-caller: error
+ no-case-declarations: warn
+ no-class-assign: warn
+ no-cond-assign:
+ - warn
+ - except-parens
+ no-confusing-arrow:
+ - warn
+ - allowParens: true
+ no-const-assign: error
+ no-constant-condition: warn
+ no-debugger: error
+ no-delete-var: warn
+ no-dupe-args: error
+ no-dupe-class-members: error
+ no-dupe-keys: error
+ no-duplicate-imports: warn
+ no-empty: warn
+ no-empty-character-class: warn
+ no-empty-function:
+ - warn
+ - allow:
+ - arrowFunctions
+ no-empty-pattern: warn
+ no-eval: error
+ no-ex-assign: warn
+ no-extend-native: error
+ no-extra-bind: warn
+ no-extra-boolean-cast: warn
+ no-extra-label: warn
+ no-extra-semi: warn
+ no-fallthrough: warn
+ no-floating-decimal: warn
+ no-func-assign: warn
+ no-implicit-globals: warn
+ no-implied-eval: error
+ no-inner-declarations: warn
+ no-invalid-regexp: error
+ no-irregular-whitespace: error
+ no-label-var: warn
+ no-labels: warn
+ no-mixed-operators: warn
+ no-mixed-spaces-and-tabs: error
+ no-native-reassign: error
+ no-negated-condition: warn
+ no-negated-in-lhs: error
+ no-nested-ternary: warn
+ no-new-func: error
+ no-new-object: warn
+ no-new-require: warn
+ no-new-symbol: error
+ no-new-wrappers: warn
+ no-obj-calls: error
+ no-octal: error
+ no-octal-escape: warn
+ no-path-concat: warn
+ no-process-exit: warn
+ no-proto: error
+ no-prototype-builtins: warn
+ no-redeclare: warn
+ no-regex-spaces: warn
+ no-script-url: error
+ no-self-assign: warn
+ no-self-compare: warn
+ no-sequences: warn
+ no-shadow-restricted-names: error
+ no-spaced-func: warn
+ no-sparse-arrays: warn
+ no-this-before-super: error
+ no-throw-literal: error
+ no-undef: error
+ no-undef-init: warn
+ no-unexpected-multiline: error
+ no-unmodified-loop-condition: warn
+ no-unneeded-ternary: warn
+ no-unreachable: warn
+ no-unsafe-finally: warn
+ no-unused-labels: warn
+ no-unused-vars: warn
+ no-use-before-define:
+ - error
+ - nofunc
+ no-useless-call: warn
+ no-useless-computed-key: warn
+ no-useless-constructor: warn
+ no-useless-escape: warn
+ no-useless-rename: warn
+ no-var: warn
+ no-warning-comments:
+ - warn
+ - location: start
+ terms:
+ - fixme
+ - xxx
+ no-whitespace-before-property: warn
+ no-with: error
+ one-var:
+ - warn
+ - never
+ prefer-rest-params: warn
+ prefer-spread: warn
+ quotes: off
+ radix: error
+ rest-spread-spacing:
+ - warn
+ - never
+ semi: warn
+ space-infix-ops: warn
+ space-unary-ops:
+ - warn
+ - words: true
+ nonwords: false
+ unicode-bom:
+ - error
+ - never
+ use-isnan: warn
+ valid-typeof: warn
+ wrap-iife:
+ - warn
+ - any
View
@@ -11,7 +11,7 @@
},
"devDependencies": {
"chai": "^3.5.0",
- "eslint": "^2.4.0",
+ "eslint": "^3.1.1",
"mocha": "^2.2.5",
"morgan": "^1.7.0",
"nock": "^2.7.0",

0 comments on commit 58c7be3

Please sign in to comment.