@tim-code/eslint-config 0.7.0 → 0.7.3

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.
Files changed (2) hide show
  1. package/.eslintrc.js +6 -2
  2. package/package.json +1 -1
package/.eslintrc.js CHANGED
@@ -58,10 +58,13 @@ 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
- // default is 50 lines which is fine but adding comments or blanks should not trigger this warning
61
+ // default is 50 lines which is sometimes limiting with Prettier's formatting (parameter destructuring can take up 10 lines for example)
62
+ // adding comments or blanks should not trigger this warning
62
63
  "max-lines-per-function": ["error", { max: 75, skipBlankLines: true, skipComments: true }],
63
64
  // allow mix of reassigned and const variables
64
65
  "prefer-const": ["error", { destructuring: "all" }],
66
+ // allow range
67
+ yoda: ["error", "never", { exceptRange: true }],
65
68
 
66
69
  // unsure
67
70
  "no-labels": "off", // useful to be able to break/continue an outer loop; otherwise have to write more code
@@ -75,7 +78,7 @@ module.exports = {
75
78
  "no-plusplus": "off", // ++ is too common of a language feature (C++)
76
79
  "no-underscore-dangle": "off", // difficult to come up with other names for named default parameters
77
80
  "max-statements": "off", // max 10 statements is way too low; unclear why number of statements is a good measurement
78
- "class-methods-use-this": "off", // possible to want a possible static method to be called like an instance method
81
+ "class-methods-use-this": "off", // allow a static method to be called like an instance method
79
82
 
80
83
  // rule conflicts with another tool
81
84
  "one-var": "off", // with Prettier, comma appears on the same line as declaration, making code less readable
@@ -93,5 +96,6 @@ module.exports = {
93
96
  "line-comment-position": "off", // relates to above rule
94
97
  "no-loop-func": "off", // this is only a concern with var declarations
95
98
  "max-classes-per-file": "off", // one class per file discourages small classes
99
+ "lines-between-class-members": "off", // discourages smaller classes
96
100
  },
97
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tim-code/eslint-config",
3
- "version": "0.7.0",
3
+ "version": "0.7.3",
4
4
  "description": "",
5
5
  "main": ".eslintrc.js",
6
6
  "author": "",