eslint-config-isaacscript 3.1.2 → 3.3.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.
Files changed (4) hide show
  1. package/base.js +23 -2
  2. package/jsdoc.js +4 -5
  3. package/mod.js +10 -0
  4. package/package.json +1 -1
package/base.js CHANGED
@@ -357,7 +357,18 @@ module.exports = {
357
357
 
358
358
  /**
359
359
  * Documentation:
360
- * https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/prefer-default-export.md
360
+ * https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-default-export.md
361
+ *
362
+ * Not defined in the parent configs.
363
+ *
364
+ * The case against default exports is layed out here:
365
+ * https://basarat.gitbook.io/typescript/main-1/defaultisbad
366
+ */
367
+ "import/no-default-export": "warn",
368
+
369
+ /**
370
+ * Documentation:
371
+ * https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md
361
372
  *
362
373
  * Defined at:
363
374
  * https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/imports.js
@@ -446,6 +457,16 @@ module.exports = {
446
457
  },
447
458
  ],
448
459
 
460
+ /**
461
+ * Documentation:
462
+ * https://eslint.org/docs/latest/rules/no-unused-expressions
463
+ *
464
+ * Not defined in parent configs.
465
+ *
466
+ * An unused expression which has no effect on the state of the program indicates a logic error.
467
+ */
468
+ "no-unused-expressions": "warn",
469
+
449
470
  /**
450
471
  * Documentation:
451
472
  * https://eslint.org/docs/latest/rules/prefer-destructuring
@@ -453,7 +474,7 @@ module.exports = {
453
474
  * Defined at:
454
475
  * https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js
455
476
  *
456
- * - Array destructuring can result in non-intuitive code.
477
+ * Array destructuring can result in non-intuitive code.
457
478
  */
458
479
  "prefer-destructuring": [
459
480
  "warn",
package/jsdoc.js CHANGED
@@ -176,21 +176,20 @@ module.exports = {
176
176
 
177
177
  // - jsdoc/require-param-type - Not needed in TypeScript.
178
178
 
179
- // - jsdoc/require-param - It's overboard for every function to document every parameter.
180
- // TODO
181
- /*
182
179
  "jsdoc/require-param": [
183
180
  "warn",
184
181
  {
182
+ // We only activate the rule when there are one or more parameters.
183
+ // https://github.com/gajus/eslint-plugin-jsdoc/issues/920
185
184
  contexts: [
186
185
  {
187
186
  context: "FunctionDeclaration",
188
- comment: 'JsdocBlock > JsdocTag[tag="param"]',
187
+ comment: 'JsdocBlock:has(JsdocTag[tag="param"])',
189
188
  },
190
189
  ],
191
190
  },
192
191
  ],
193
- */
192
+
194
193
  // - jsdoc/require-property - Probably not needed in TypeScript.
195
194
 
196
195
  /**
package/mod.js CHANGED
@@ -131,6 +131,16 @@ module.exports = {
131
131
  */
132
132
  "isaacscript/no-invalid-default-map": "warn",
133
133
 
134
+ /**
135
+ * Documentation:
136
+ * https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-plugin-isaacscript/docs/rules/no-throw.md
137
+ *
138
+ * Not defined in the parent configs.
139
+ *
140
+ * The `throw` keyword should never be used in Isaac mods.
141
+ */
142
+ "isaacscript/no-throw": "warn",
143
+
134
144
  /**
135
145
  * Documentation:
136
146
  * https://eslint.org/docs/latest/rules/no-bitwise
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "3.1.2",
3
+ "version": "3.3.0",
4
4
  "description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
5
5
  "keywords": [
6
6
  "eslint",