Permalink
Browse files

Eslint upgrade to 19.0.0 and configuration fixes (#1294)

Original PR by @travnels, commit-message edited by @nknapp

* Upgraded eslint to 19.0.0
* Cleaned up duplicate rules 'no-extra-parens', 'quote-props'
* eslint rule 'no-empty-label' was replaced.
  Rule 'no-empty-label' was removed and replaced by: ‘no-labels’. ‘no-labels’ already in the project
* eslint rule 'space-after-keywords' has been replaced
  Rules 'space-after-keywords' and 'space-return-throw-case' wer removed and replaced by ‘keyword-spacing’.
* Added parsoer-option: sourceType='module'
* Add unnecessary=false to 'quote-props' to remove warnings about unnecessarily quoted property. 

Code corrections
* helpers.js: unused variable 'depthString' removed, detected by new eslint
  • Loading branch information...
1 parent 2b7ed7e commit d117b3e0f9ab297b8868d258f141a362745c8371 @nknapp nknapp committed on GitHub Jan 6, 2017
Showing with 7 additions and 10 deletions.
  1. +5 −6 .eslintrc
  2. +1 −3 lib/handlebars/compiler/helpers.js
  3. +1 −1 package.json
View
@@ -43,7 +43,6 @@
"no-empty-character-class": 2,
"no-ex-assign": 2,
"no-extra-boolean-cast": 2,
- "no-extra-parens": 0,
"no-extra-semi": 2,
"no-func-assign": 0,
@@ -55,7 +54,7 @@
"no-negated-in-lhs": 2,
"no-obj-calls": 2,
"no-regex-spaces": 2,
- "quote-props": [2, "as-needed", {"keywords": true}],
+ "quote-props": [2, "as-needed", {"keywords": true, "unnecessary": false}],
"no-sparse-arrays": 0,
// Optimizer and coverage will handle/highlight this and can be useful for debugging
@@ -80,7 +79,6 @@
"no-caller": 2,
"no-div-regex": 1,
"no-else-return": 0,
- "no-empty-label": 2,
"no-eq-null": 0,
"no-eval": 2,
"no-extend-native": 2,
@@ -179,22 +177,23 @@
"one-var": 0,
"operator-assignment": 0,
"padded-blocks": 0,
- "quote-props": 0,
"quotes": [2, "single", "avoid-escape"],
"semi": 2,
"semi-spacing": [2, {"before": false, "after": true}],
"sort-vars": 0,
- "space-after-keywords": [2, "always"],
+ "keyword-spacing": 2,
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, {"anonymous": "never", "named": "never"}],
"space-in-brackets": 0,
"space-in-parens": [2, "never"],
"space-infix-ops": 2,
- "space-return-throw-case": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always", {"markers": [","]}],
"wrap-regex": 1,
"no-var": 1
+ },
+ "parserOptions": {
+ "sourceType": "module"
}
}
@@ -47,8 +47,7 @@ export function preparePath(data, parts, loc) {
let original = data ? '@' : '',
dig = [],
- depth = 0,
- depthString = '';
+ depth = 0;
for (let i = 0, l = parts.length; i < l; i++) {
let part = parts[i].part,
@@ -62,7 +61,6 @@ export function preparePath(data, parts, loc) {
throw new Exception('Invalid path: ' + original, {loc});
} else if (part === '..') {
depth++;
- depthString += '../';
}
} else {
dig.push(part);
View
@@ -44,7 +44,7 @@
"grunt-contrib-copy": "0.x",
"grunt-contrib-uglify": "0.x",
"grunt-contrib-watch": "0.x",
- "grunt-eslint": "^17.1.0",
+ "grunt-eslint": "19.0.x",
"grunt-saucelabs": "8.x",
"grunt-webpack": "^1.0.8",
"istanbul": "kpdecker/istanbul",

0 comments on commit d117b3e

Please sign in to comment.