Skip to content

Commit

Permalink
Merge pull request #5 from Rautherdir/update-rules
Browse files Browse the repository at this point in the history
Add no-else-return and update no-unused-vars and keyword-spacing
  • Loading branch information
Cherry committed Mar 13, 2020
2 parents bac4c17 + 159f8b0 commit 0dd9530
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions rules/best-practices.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module.exports = {
// require the use of === and !==
"eqeqeq": "error",

// disallow `else` blocks after `return` statements in `if` statements
"no-else-return": "error",

// disallow the use of eval()
"no-eval": "error",

Expand Down
4 changes: 4 additions & 0 deletions rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ module.exports = {
"catch": {
"before": false,
"after": false
},
"this": {
"before": true,
"after": false
}
}
}],
Expand Down
5 changes: 4 additions & 1 deletion rules/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

module.exports = {
rules: {

// disallow unused variables
"no-unused-vars": ["error", {
"ignoreRestSiblings": true
}]
}
};

0 comments on commit 0dd9530

Please sign in to comment.