eslint-config-isaacscript 4.0.8 → 4.1.0

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/base-eslint.js CHANGED
@@ -119,15 +119,15 @@ const SUGGESTIONS = {
119
119
  "class-methods-use-this": "off",
120
120
 
121
121
  /**
122
- * Disabled since cyclomatic complexity is not a good enough general indicator of code complexity.
122
+ * Disabled since cyclomatic complexity is not a good enough general indicator of code complexity
123
+ * and leads to too many false positives.
123
124
  */
124
125
  complexity: "off",
125
126
 
126
127
  /** Disabled since this is handled by the `noImplicitReturns` TypeScript compiler flag. */
127
128
  "consistent-return": "off",
128
129
 
129
- /** Disabled since capturing `this` is largely obviated by using modern arrow functions. */
130
- "consistent-this": "off",
130
+ "consistent-this": "error",
131
131
 
132
132
  /**
133
133
  * Always requiring curly braces can partially ward against [Apple-style if statement
@@ -138,8 +138,8 @@ const SUGGESTIONS = {
138
138
  curly: ["error", "all"],
139
139
 
140
140
  /**
141
- * Disabled since it is [generally bad in TypeScript
142
- * projects](https://github.com/typescript-eslint/typescript-eslint/issues/5254#issuecomment-1168992749).
141
+ * Disabled since it would cause the `@typescript-eslint/switch-exhaustiveness-check` rule to not
142
+ * work properly.
143
143
  */
144
144
  "default-case": "off",
145
145
 
@@ -157,7 +157,10 @@ const SUGGESTIONS = {
157
157
  "func-name-matching": "error",
158
158
  "func-names": "error",
159
159
 
160
- /** Disabled since it is common to use both function forms, depending on the situation. */
160
+ /**
161
+ * Disabled since it is common in the TypeScript ecosystem to use both function forms, depending
162
+ * on the situation.
163
+ */
161
164
  "func-style": "off",
162
165
 
163
166
  "grouped-accessor-pairs": "error",
@@ -239,7 +242,11 @@ const SUGGESTIONS = {
239
242
  */
240
243
  "no-console": "off",
241
244
 
242
- /** Disabled because proper use of continues can reduce indentation for long blocks of code. */
245
+ /**
246
+ * Disabled because proper use of continues can reduce indentation for long blocks of code in the
247
+ * same way as the [early return
248
+ * pattern](https://medium.com/swlh/return-early-pattern-3d18a41bba8).
249
+ */
243
250
  "no-continue": "off",
244
251
 
245
252
  "no-delete-var": "error",
@@ -10,7 +10,19 @@ const config = {
10
10
  plugins: ["no-autofix"],
11
11
 
12
12
  rules: {
13
+ /**
14
+ * It is common during development to comment out code after an [early
15
+ * return](https://medium.com/swlh/return-early-pattern-3d18a41bba8). In these cases, the
16
+ * auto-fixer is harmful, since it would require us to manually go put the return statement back
17
+ * after uncommenting the code.
18
+ */
13
19
  "no-autofix/no-useless-return": "error",
20
+
21
+ /**
22
+ * It is common during development to comment out code that modifies a `let` variable. In these
23
+ * cases, the auto-fixer is harmful, since it would require us to manually go change the `const`
24
+ * back to a `let` after uncommenting the code.
25
+ */
14
26
  "no-autofix/prefer-const": "error",
15
27
  },
16
28
  };
package/base.js CHANGED
@@ -56,6 +56,7 @@ const config = {
56
56
  {
57
57
  files: ["*.js", "*.cjs", "*.mjs", "*.jsx"],
58
58
  rules: {
59
+ "isaacscript/no-let-any": "off",
59
60
  "isaacscript/no-object-any": "off",
60
61
  "isaacscript/require-capital-const-assertions": "off",
61
62
  "isaacscript/require-capital-read-only": "off",
package/mod.js CHANGED
@@ -7,7 +7,7 @@ const config = {
7
7
  extends: [
8
8
  /**
9
9
  * The IsaacScript mod config extends the base configuration:
10
- * https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-config-isaacscript/base.js
10
+ * https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-config-isaacscript/configs/base.js
11
11
  * (Normal TypeScript projects would just use the base configuration directly.)
12
12
  */
13
13
  "./base",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "4.0.8",
3
+ "version": "4.1.0",
4
4
  "description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
5
5
  "keywords": [
6
6
  "eslint",