eslint-config-isaacscript 1.0.67 → 1.0.70

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/README.md +2 -2
  2. package/base.js +4 -107
  3. package/jsdoc.js +62 -0
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- [![npm version](https://img.shields.io/npm/v/eslint-config-isaacscript.svg)](https://www.npmjs.com/package/eslint-config-isaacscript)
2
-
3
1
  # eslint-config-isaacscript
4
2
 
3
+ [![npm version](https://img.shields.io/npm/v/eslint-config-isaacscript.svg)](https://www.npmjs.com/package/eslint-config-isaacscript)
4
+
5
5
  This is a helper configuration for ESLint that is intended to be used in IsaacScript projects.
6
6
 
7
7
  Please see the [IsaacScript webpage](https://isaacscript.github.io/) for more information.
package/base.js CHANGED
@@ -22,9 +22,6 @@ module.exports = {
22
22
  "plugin:@typescript-eslint/recommended",
23
23
  "plugin:@typescript-eslint/recommended-requiring-type-checking",
24
24
 
25
- // This provides rules for max comment length that the "--fix" flag can fix
26
- "plugin:comment-length-2/recommended",
27
-
28
25
  // This provides extra miscellaneous rules to keep code safe
29
26
  "plugin:isaacscript/recommended",
30
27
 
@@ -32,14 +29,8 @@ module.exports = {
32
29
  // https://github.com/mysticatea/eslint-plugin-eslint-comments
33
30
  "plugin:eslint-comments/recommended",
34
31
 
35
- // Lint JSDoc style comments
36
- // https://github.com/gajus/eslint-plugin-jsdoc
37
- "plugin:jsdoc/recommended",
38
-
39
- // This prevents implicit iteration of Maps and Sets,
40
- // which is helpful to prevent bugs when refactoring
41
- // https://github.com/Zamiell/eslint-plugin-no-implicit-map-set-loops
42
- "plugin:no-implicit-map-set-loops/recommended",
32
+ // This provides rules to lint JSDoc comments
33
+ "./jsdoc",
43
34
 
44
35
  // Disable any ESLint rules that conflict with Prettier
45
36
  // (otherwise, we will have unfixable ESLint errors)
@@ -129,13 +120,14 @@ module.exports = {
129
120
  // Defined at:
130
121
  // https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js
131
122
  // We want to lint unused arguments (the default is "after-used")
132
- // We also want to ignore function arguments that start with an underscore
123
+ // We also want to ignore arguments/variables that start with an underscore
133
124
  // This matches the behavior of the TypeScript compiler flag "--noUnusedLocals"
134
125
  "@typescript-eslint/no-unused-vars": [
135
126
  "warn",
136
127
  {
137
128
  args: "all",
138
129
  argsIgnorePattern: "^_",
130
+ varsIgnorePattern: "^_",
139
131
  },
140
132
  ],
141
133
 
@@ -185,30 +177,6 @@ module.exports = {
185
177
  },
186
178
  ],
187
179
 
188
- // Documentation:
189
- // https://github.com/lasselupe33/eslint-plugin-comment-length
190
- // Defined at:
191
- // https://github.com/lasselupe33/eslint-plugin-comment-length/blob/master/rules/src/index.ts
192
- // Auto-fix long comments. We specify 100 to match the ruler and the Airbnb style guide.
193
- "comment-length-2/limit-multi-line-comments": [
194
- "warn",
195
- {
196
- maxLength: 100,
197
- },
198
- ],
199
-
200
- // Documentation:
201
- // https://github.com/lasselupe33/eslint-plugin-comment-length
202
- // Defined at:
203
- // https://github.com/lasselupe33/eslint-plugin-comment-length/blob/master/rules/src/index.ts
204
- // Auto-fix long comments. We specify 100 to match the ruler and the Airbnb style guide.
205
- "comment-length-2/limit-single-line-comments": [
206
- "warn",
207
- {
208
- maxLength: 100,
209
- },
210
- ],
211
-
212
180
  // Documentation:
213
181
  // https://github.com/mysticatea/eslint-plugin-eslint-comments/blob/master/docs/rules/disable-enable-pair.md
214
182
  // Defined at:
@@ -244,77 +212,6 @@ module.exports = {
244
212
  // https://basarat.gitbook.io/typescript/main-1/defaultisbad
245
213
  "import/prefer-default-export": "off",
246
214
 
247
- // Documentation:
248
- // https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-check-tag-names
249
- // Defined at:
250
- // https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/index.js
251
- // Allow the use of TypeScriptToLua compiler annotations as documented here:
252
- // https://typescripttolua.github.io/docs/advanced/compiler-annotations
253
- "jsdoc/check-tag-names": [
254
- "warn",
255
- {
256
- definedTags: [
257
- "category", // Used in TypeDoc
258
- "hidden", // Used in TypeDoc
259
- "internal", // Used by TypeScript
260
- "noResolution", // Used in TypeScriptToLua as a compiler annotation
261
- "noSelf", // Used in TypeScriptToLua as a compiler annotation
262
- ],
263
- },
264
- ],
265
-
266
- // Documentation:
267
- // https://github.com/gajus/eslint-plugin-jsdoc#user-content-eslint-plugin-jsdoc-rules-match-description
268
- // Not defined in parent configs
269
- // Needed for catching superfluous leading and trailing newlines as documented here:
270
- // https://github.com/gajus/eslint-plugin-jsdoc/issues/847
271
- "jsdoc/match-description": [
272
- "warn",
273
- {
274
- matchDescription: "^\\S[\\s\\S]*\\S$",
275
- contexts: [
276
- {
277
- comment: "JsdocBlock[endLine!=0]:not(:has(JsdocTag))",
278
- },
279
- ],
280
- },
281
- ],
282
-
283
- // Documentation:
284
- // https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-jsdoc
285
- // Defined at:
286
- // https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/index.js
287
- // Do not require JSDoc comments for every function, as that is excessive
288
- "jsdoc/require-jsdoc": "off",
289
-
290
- // Documentation:
291
- // https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param
292
- // Defined at:
293
- // https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/index.js
294
- // Do not require parameters for every function, as that is excessive when using TypeScript
295
- "jsdoc/require-param": "off",
296
-
297
- // Documentation:
298
- // https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-param-type
299
- // Defined at:
300
- // https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/index.js
301
- // Since we are using TypeScript, requiring parameter types would be superfluous
302
- "jsdoc/require-param-type": "off",
303
-
304
- // Documentation:
305
- // https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-returns
306
- // Defined at:
307
- // https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/index.js
308
- // Do not require return listing for every function, as that is excessive when using TypeScript
309
- "jsdoc/require-returns": "off",
310
-
311
- // Documentation:
312
- // https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-returns-type
313
- // Defined at:
314
- // https://github.com/gajus/eslint-plugin-jsdoc/blob/master/src/index.js
315
- // Since we are using TypeScript, requiring parameter types would be superfluous
316
- "jsdoc/require-returns-type": "off",
317
-
318
215
  // Documentation:
319
216
  // https://eslint.org/docs/rules/no-console
320
217
  // Defined at:
package/jsdoc.js ADDED
@@ -0,0 +1,62 @@
1
+ // This is a shared configuration file for ESLint
2
+ // https://eslint.org/docs/user-guide/configuring
3
+ module.exports = {
4
+ plugins: [
5
+ // Lint JSDoc style comments
6
+ // https://github.com/gajus/eslint-plugin-jsdoc
7
+ "jsdoc",
8
+ ],
9
+
10
+ rules: {
11
+ // jsdoc/check-access - Not needed in TypeScript.
12
+ // jsdoc/check-alignment - Overlaps with `isaacscript-limit-jsdoc-comments`.
13
+ // jsdoc/check-examples - Not worth it since some ESLint rules may not apply to examples.
14
+ // jsdoc/check-indentation - Overlaps with `isaacscript-limit-jsdoc-comments`.
15
+ // jsdoc/check-line-alignment - This is not a common formatting scheme in the wild. It's also
16
+ // not recommended by the plugin.
17
+
18
+ // Documentation:
19
+ // https://github.com/gajus/eslint-plugin-jsdoc#check-param-names
20
+ // Ensures that parameter names in JSDoc match those in the function declaration.
21
+ "jsdoc/check-param-names": "warn",
22
+
23
+ // jsdoc/check-property-names - Not needed in TypeScript.
24
+ // jsdoc/check-syntax - Not needed in TypeScript.
25
+
26
+ // Documentation:
27
+ // https://github.com/gajus/eslint-plugin-jsdoc#check-tag-names
28
+ // Allow the use of TypeScriptToLua compiler annotations as documented here:
29
+ // https://typescripttolua.github.io/docs/advanced/compiler-annotations
30
+ "jsdoc/check-tag-names": [
31
+ "warn",
32
+ {
33
+ definedTags: [
34
+ "category", // Used in TypeDoc
35
+ "hidden", // Used in TypeDoc
36
+ "internal", // Used by TypeScript
37
+ "noResolution", // Used in TypeScriptToLua as a compiler annotation
38
+ "noSelf", // Used in TypeScriptToLua as a compiler annotation
39
+ ],
40
+ },
41
+ ],
42
+
43
+ // jsdoc/check-types - Not needed in TypeScript.
44
+
45
+ // Documentation:
46
+ // https://github.com/gajus/eslint-plugin-jsdoc#check-values
47
+ // Validates the content of some uncommon JSDoc tags
48
+ "jsdoc/check-values": "warn",
49
+
50
+ // Documentation:
51
+ // https://github.com/gajus/eslint-plugin-jsdoc#check-values
52
+ // Validates the content of some uncommon JSDoc tags
53
+ "jsdoc/empty-tags": "warn",
54
+
55
+ // Documentation:
56
+ // https://github.com/gajus/eslint-plugin-jsdoc#implements-on-classes
57
+ // Reports issues with incorrect usage of @implements
58
+ "jsdoc/implements-on-classes": "warn",
59
+
60
+ // jsdoc/match-description - Overlaps with `isaacscript-jsdoc-full-sentences`.
61
+ },
62
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "1.0.67",
3
+ "version": "1.0.70",
4
4
  "description": "An ESLint config for IsaacScript projects.",
5
5
  "repository": {
6
6
  "type": "git",