Skip to content

Commit

Permalink
[eslint] enable and manually fix no-continue
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed May 20, 2019
1 parent b8a6c11 commit 3f624d6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"no-plusplus": 1,
"no-param-reassign": 1,
"no-mixed-operators": 1,
"no-continue": 1,
"global-require": 1,
"no-restricted-syntax": 1,
"valid-jsdoc": 1,
Expand Down
20 changes: 9 additions & 11 deletions lib/rules/sort-comp.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,17 +278,15 @@ module.exports = {
*/
function dedupeErrors() {
for (const i in errors) {
if (!has(errors, i)) {
continue;
}
const index = errors[i].closest.ref.index;
if (!errors[index]) {
continue;
}
if (errors[i].score > errors[index].score) {
delete errors[index];
} else {
delete errors[i];
if (has(errors, i)) {
const index = errors[i].closest.ref.index;
if (errors[index]) {
if (errors[i].score > errors[index].score) {
delete errors[index];
} else {
delete errors[i];
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/util/Components.js
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ function componentRule(rule, context) {
// Traverse the node properties to the component declaration
for (i = 0, j = componentPath.length; i < j; i++) {
if (!componentNode.properties) {
continue;
continue; // eslint-disable-line no-continue
}
for (k = 0, l = componentNode.properties.length; k < l; k++) {
if (componentNode.properties[k].key && componentNode.properties[k].key.name === componentPath[i]) {
Expand Down

0 comments on commit 3f624d6

Please sign in to comment.