Skip to content

Commit

Permalink
feat: loosen metrics rules level to warn (#1060)
Browse files Browse the repository at this point in the history
The ideal metrics are different for each project.
So, `warn` should be suitable by default, instead of `error`.
  • Loading branch information
ybiquitous authored Mar 5, 2022
1 parent 74267b0 commit 929b6a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions rules/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
camelcase: ["error", { properties: "never" }],
"capitalized-comments": "off",
"class-methods-use-this": "warn",
complexity: "error",
complexity: "warn",
"consistent-return": "error",
"consistent-this": "off",
"default-case": "error",
Expand All @@ -32,14 +32,14 @@ module.exports = {
"init-declarations": "off",
"line-comment-position": "off",
"lines-between-class-members": "error",
"max-classes-per-file": ["error", 5],
"max-depth": "error",
"max-lines": "error",
"max-lines-per-function": "error",
"max-nested-callbacks": "error",
"max-params": "error",
"max-statements": "error",
"max-statements-per-line": "error",
"max-classes-per-file": ["warn", 5],
"max-depth": "warn",
"max-lines": "warn",
"max-lines-per-function": "warn",
"max-nested-callbacks": "warn",
"max-params": "warn",
"max-statements": "warn",
"max-statements-per-line": "warn",
"multiline-comment-style": "off",
"new-cap": "error",
"no-alert": "off",
Expand Down
2 changes: 1 addition & 1 deletion rules/plugins/react-jsx.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
"react/jsx-filename-extension": ["error", { extensions: [".js", ".jsx", ".tsx"] }],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-handler-names": "error",
"react/jsx-max-depth": ["error", { max: 5 }],
"react/jsx-max-depth": ["warn", { max: 5 }],
"react/jsx-newline": "off",
"react/jsx-no-bind": [
"error",
Expand Down

0 comments on commit 929b6a6

Please sign in to comment.