@tim-code/eslint-config 0.6.0 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -2
- package/package.json +1 -1
package/.eslintrc.js
CHANGED
|
@@ -58,8 +58,10 @@ module.exports = {
|
|
|
58
58
|
"multiline-comment-style": ["error", "separate-lines"],
|
|
59
59
|
// errors need to be logged somehow
|
|
60
60
|
"no-console": ["error", { allow: ["error"] }],
|
|
61
|
-
//
|
|
62
|
-
"max-
|
|
61
|
+
// default is 50 lines which is fine but adding comments or blanks should not trigger this warning
|
|
62
|
+
"max-lines-per-function": ["error", { max: 50, skipBlankLines: true, skipComments: true }],
|
|
63
|
+
// allow mix of reassigned and const variables
|
|
64
|
+
"prefer-const": ["error", { destructuring: "all" }],
|
|
63
65
|
|
|
64
66
|
// unsure
|
|
65
67
|
"no-labels": "off", // useful to be able to break/continue an outer loop; otherwise have to write more code
|
|
@@ -72,6 +74,7 @@ module.exports = {
|
|
|
72
74
|
"id-length": "off", // single character variables can sometimes be useful: i, j, x, y, $, _
|
|
73
75
|
"no-plusplus": "off", // ++ is too common of a language feature (C++)
|
|
74
76
|
"no-underscore-dangle": "off", // difficult to come up with other names for named default parameters
|
|
77
|
+
"max-statements": "off", // max 10 statements is way too low; unclear why number of statements is a good measurement
|
|
75
78
|
|
|
76
79
|
// rule conflicts with another tool
|
|
77
80
|
"one-var": "off", // with Prettier, comma appears on the same line as declaration, making code less readable
|
|
@@ -87,5 +90,6 @@ module.exports = {
|
|
|
87
90
|
"no-continue": "off", // continue is a useful language feature
|
|
88
91
|
"no-inline-comments": "off", // not adhered to in this file for example
|
|
89
92
|
"line-comment-position": "off", // relates to above rule
|
|
93
|
+
"no-loop-func": "off", // this is only a concern with var declarations
|
|
90
94
|
},
|
|
91
95
|
}
|