From fe6063bb7aff7de80304ac50e4887cb131ff67d0 Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Tue, 29 Mar 2016 16:43:25 +0800 Subject: [PATCH] Update to eslint 2.x. --- package.json | 2 +- test/.eslintrc | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 3e7118104..1ff767812 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "devDependencies": { "chai": "^3.4.1", "chroma-sass": "^1.1.2", - "eslint": "^1.9.0", + "eslint": "^2.4.0", "mocha": "^2.3.4", "sassy-test": "^2.0.0", "support-for": "^1.0.5", diff --git a/test/.eslintrc b/test/.eslintrc index cf8077d1d..d9f97a2c9 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -28,21 +28,20 @@ "guard-for-in": 2, "indent": [2, 2, {"SwitchCase": 1}], "key-spacing": [2, {"beforeColon": false, "afterColon": true}], + "keyword-spacing": 2, "linebreak-style": [2, "unix"], + "max-nested-callbacks": [2, 4], "new-parens": 2, "no-array-constructor": 2, "no-caller": 2, "no-catch-shadow": 2, - "no-empty-label": 2, "no-eval": 2, "no-extend-native": 2, "no-extra-bind": 2, - // @TODO: Appears to be buggy in eslint 1.1.0. (function(){}).should.throw() - "no-extra-parens": [0, "functions"], "no-implied-eval": 2, "no-iterator": 2, "no-label-var": 2, - "no-labels": 2, + "no-labels": [2, {"allowLoop": true, "allowSwitch": true}], "no-lone-blocks": 2, "no-loop-func": 2, "no-mixed-requires": [2, false], @@ -65,20 +64,16 @@ "no-trailing-spaces": 2, "no-undef-init": 2, "no-undefined": 2, - "no-unused-expressions": 2, - "no-unused-vars": [2, {"args": "none"}], + "no-unused-vars": 2, "no-with": 2, "object-curly-spacing": [2, "never"], "quote-props": [2, "consistent-as-needed"], "quotes": [2, "single", "avoid-escape"], "semi": [2, "always"], "semi-spacing": [2, {"before": false, "after": true}], - "space-after-keywords": [2, "always"], - "space-before-blocks": [2, "always"], "space-before-function-paren": [2, "never"], "space-in-parens": [2, "never"], "space-infix-ops": 2, - "space-return-throw-case": 2, "space-unary-ops": [2, { "words": true, "nonwords": false }], "spaced-comment": [2, "always"], "strict": [2, "global"], @@ -91,9 +86,6 @@ "wrap-iife": 2, "yoda": [2, "never"], // Disabled. - "no-console": 0, - // This rule doesn't like var should = require('chai').should(); - "no-mixed-requires": 0, // Chai assertions are "unused" expressions. "no-unused-expressions": 0 }