Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Commit

Permalink
Added a few new rules to warn on commented out code + warning comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
swernerx committed Aug 9, 2017
1 parent a7f613c commit 3d192f3
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
11 changes: 11 additions & 0 deletions eslint/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Code Quality
#######################################################################################

plugins:
- extra-rules

rules:
# Enforces return statements in callbacks of array’s methods like `filter`
array-callback-return: error
Expand Down Expand Up @@ -36,6 +39,11 @@ rules:
# Trailing newlines in non-empty files are a common UNIX idiom.
eol-last: error

# Warn on any outcommented code. Typically this is temporarly and should
# be cleaned up over time.
# https://github.com/bahmutov/eslint-rules
extra-rules/no-commented-out-code: warn

# Disallow spacing between function identifiers and their invocations.
# Otherwise might be visually confusing.
func-call-spacing: error
Expand Down Expand Up @@ -479,6 +487,9 @@ rules:
# Disallow use of the void operator.
no-void: error

# Warn on warning comments. These are technical dept which should be removed.
no-warning-comments: warn

# Disallow with statements
# The with statement is potentially problematic because it adds members of an object to the
# current scope, making it impossible to tell what a variable inside the block actually refers to.
Expand Down
2 changes: 2 additions & 0 deletions eslint/react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ rules:
react/no-will-update-set-state: error

# Prevent usage of .bind() and arrow functions in JSX props
# Excellent tip on how the alternative would look like:
# https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md#protips
react/jsx-no-bind: warn


Expand Down
46 changes: 45 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"eslint-plugin-babel": "^4.1.2",
"eslint-plugin-compat": "^1.0.4",
"eslint-plugin-css-modules": "^2.7.3",
"eslint-plugin-extra-rules": "^0.8.1",
"eslint-plugin-filenames": "^1.2.0",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-flowtype-errors": "^3.3.1",
Expand Down

0 comments on commit 3d192f3

Please sign in to comment.