Skip to content

Commit

Permalink
tools: enable additional eslint rules
Browse files Browse the repository at this point in the history
Enable additional rules that node either already adheres to
or it makes sense to do so going forward: for-direction,
accessor-pairs, no-lonely-if and symbol-description.

Refs: https://eslint.org/docs/rules/for-direction
Refs: https://eslint.org/docs/rules/accessor-pairs
Refs: https://eslint.org/docs/rules/no-lonely-if
Refs: https://eslint.org/docs/rules/symbol-description
  • Loading branch information
apapirovski committed Oct 18, 2017
1 parent bda0695 commit 99fe59e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ overrides:
rules:
# Possible Errors
# http://eslint.org/docs/rules/#possible-errors
for-direction: error
no-control-regex: error
no-debugger: error
no-dupe-args: error
Expand All @@ -41,6 +42,7 @@ rules:

# Best Practices
# http://eslint.org/docs/rules/#best-practices
accessor-pairs: error
dot-location: [error, property]
eqeqeq: [error, smart]
no-fallthrough: error
Expand Down Expand Up @@ -122,6 +124,7 @@ rules:
ignoreUrls: true,
tabWidth: 2}]
new-parens: error
no-lonely-if: error
no-mixed-spaces-and-tabs: error
no-multiple-empty-lines: [error, {max: 2, maxEOF: 0, maxBOF: 0}]
no-restricted-syntax: [error, {
Expand Down Expand Up @@ -172,6 +175,7 @@ rules:
no-this-before-super: error
prefer-const: [error, {ignoreReadBeforeAssign: true}]
rest-spread-spacing: error
symbol-description: error
template-curly-spacing: error

# Custom rules in tools/eslint-rules
Expand Down
1 change: 1 addition & 0 deletions doc/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rules:
no-undef: off
no-unused-vars: off
strict: off
symbol-description: off

# add new ECMAScript features gradually
no-var: error
Expand Down
1 change: 1 addition & 0 deletions test/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rules:
# http://eslint.org/docs/rules/#ecmascript-6
no-var: error
prefer-const: error
symbol-description: off

# Custom rules in tools/eslint-rules
prefer-assert-iferror: error
Expand Down

0 comments on commit 99fe59e

Please sign in to comment.