From 3b776981f0e53d8db7a0d42b8bded84d234496ae Mon Sep 17 00:00:00 2001 From: BJR Matos Date: Sun, 5 Jun 2016 19:14:36 -0500 Subject: [PATCH] [update] eslint and lint rules --- .eslintrc | 22 +++++++++++++--------- package.json | 5 +++-- test/.eslintrc | 5 +++++ 3 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 test/.eslintrc diff --git a/.eslintrc b/.eslintrc index 0616ba9..006509d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,19 +1,20 @@ { - "extends": "eslint-config-airbnb/base", // https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb/.eslintrc + "extends": "eslint-config-airbnb-base", // Allow the following global variables "env": { - "browser": true, // browser global variables - "node": true, // Node.js global variables and Node.js scoping. - "mocha": true // adds all of the Mocha testing global variables. + "node": true // Node.js global variables and Node.js scoping. }, - "ecmaFeatures": { - "restParams": true, - "experimentalObjectRestSpread": true + "parserOptions": { + "ecmaFeatures": { + experimentalObjectRestSpread: true + } }, "rules": { + "strict": [2, "safe"], + /** * ES6 */ @@ -52,6 +53,7 @@ "builtinGlobals": true }], "wrap-iife": [2, "inside"], + "max-len": [2, 130, 2, {"ignoreUrls": true}], /** * Style @@ -61,7 +63,8 @@ "var": 2, "let": 2, "const": 3 - } + }, + "SwitchCase": 1 }], "func-names": 0, "no-multiple-empty-lines": [2, { @@ -69,6 +72,7 @@ }], "no-extra-parens": [2, "functions"], "one-var": 0, - "space-before-function-paren": [2, "never"] + "space-before-function-paren": [2, "never"], + "no-underscore-dangle": 0 } } diff --git a/package.json b/package.json index ef5f732..9bbbda8 100644 --- a/package.json +++ b/package.json @@ -36,9 +36,10 @@ }, "devDependencies": { "babel": "5.8.34", - "eslint": "1.10.3", - "eslint-config-airbnb": "2.0.0", "electron-prebuilt": "1.2.1", + "eslint": "2.11.1", + "eslint-config-airbnb-base": "3.0.1", + "eslint-plugin-import": "1.8.1", "jsreport-core": "0.6.4", "jsreport-express": "0.3.2", "jsreport-templates": "0.3.0", diff --git a/test/.eslintrc b/test/.eslintrc new file mode 100644 index 0000000..7570cf1 --- /dev/null +++ b/test/.eslintrc @@ -0,0 +1,5 @@ +{ + "env": { + "mocha": true // adds all of the Mocha testing global variables. + } +}