lint: Add babel rules to .eslintrc

This commit is contained in:
Blade Barringer 2016-01-02 18:25:30 -06:00
parent 66572ad9d5
commit c06d87b98b
2 changed files with 20 additions and 12 deletions

View file

@ -1,6 +1,8 @@
{
"parser": "babel-eslint",
"plugins": ["babel"],
"rules": {
"indent": [2, 2],
"indent": [2, 2, {"SwitchCase": 1}],
"quotes": [2, "single"],
"linebreak-style": [2, "unix"],
"semi": [2, "always"],
@ -43,13 +45,13 @@
"no-self-compare": 2,
"no-return-assign": 2,
"no-redeclare": 2,
"strict": [2, "global"],
"strict": [0, "global"],
"no-delete-var": 2,
"no-label-var": 2,
"no-shadow-restricted-names": 2,
"no-shadow": [2, { "builtinGlobals": true }],
"no-undef-init": 2,
"no-undef": [2, { typeof: true }],
"no-undef": [2, { "typeof": true }],
"no-unused-vars": 2,
"no-use-before-define": 2,
"global-require": 2,
@ -64,7 +66,7 @@
"no-dupe-class-members": 2,
"no-this-before-super": 2,
"no-var": 2,
"object-shorthand": 2,
"object-shorthand": 0,
"prefer-const": 0,
"prefer-spread": 2,
"prefer-template": 2,
@ -75,15 +77,15 @@
"comma-style": [2, "last"],
"comma-dangle": [2, "always-multiline"],
"computed-property-spacing": [2, "never"],
"consistent-this": [2, "self"],
"consistent-this": [0, "self"],
"func-names": 2,
"func-style": [2, "declaration", { "allowArrowFunctions": true }],
"block-spacing": [2, "always"],
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
"max-nested-callbacks": [2, 3],
"new-cap": 2,
"new-cap": 0,
"new-parens": 2,
"newline-after-var": 2,
"newline-after-var": 0,
"no-array-constructor": 2,
"no-continue": 2,
"no-lonely-if": 2,
@ -104,17 +106,21 @@
"space-infix-ops": 2,
"space-return-throw-case": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always", { exceptions: ["-"]}],
"spaced-comment": [2, "always", { "exceptions": ["-"]}],
"padded-blocks": [2, "never"],
"no-multiple-empty-lines": [2, {max: 2}]
"no-multiple-empty-lines": [2, {"max": 2}],
"generator-star-spacing": 0,
"babel/new-cap": 2,
"babel/object-shorthand": 2,
"babel/no-await-in-loop": 2
},
"env": {
"es6": true,
"mocha": true,
"node": true
},
ecmaFeatures : {
modules: true
"ecmaFeatures" : {
"modules": true
},
"extends": "eslint:recommended"
}

View file

@ -91,17 +91,18 @@
"coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html"
},
"devDependencies": {
"babel-eslint": "^4.1.6",
"chai": "^3.4.0",
"chai-as-promised": "^5.1.0",
"coveralls": "^2.11.2",
"csv": "~0.3.6",
"deep-diff": "~0.1.4",
"eslint": "^1.9.0",
"eslint-plugin-babel": "^3.0.0",
"eslint-plugin-mocha": "^1.1.0",
"event-stream": "^3.2.2",
"expect.js": "~0.2.0",
"istanbul": "^0.3.14",
"phantomjs": "^1.9",
"karma": "~0.13.15",
"karma-babel-preprocessor": "^5.0.0",
"karma-chai-plugins": "~0.6.0",
@ -113,6 +114,7 @@
"mocha": "^2.3.3",
"mongodb": "^2.0.46",
"mongoskin": "~0.6.1",
"phantomjs": "^1.9",
"protractor": "~2.5.1",
"rewire": "^2.3.3",
"rimraf": "^2.4.3",