eslint-config-isaacscript 3.0.1 → 3.1.1

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 +6 -0
  2. package/jsdoc.js +20 -0
  3. package/mod.js +30 -1
  4. package/package.json +1 -1
package/base.js CHANGED
@@ -65,6 +65,12 @@ module.exports = {
65
65
  */
66
66
  "only-warn",
67
67
 
68
+ /**
69
+ * Activate the "no-type-assertion" plugin, which allows the "no-type-assertion" rule to be
70
+ * optionally enabled on a per-project basis.
71
+ */
72
+ "no-type-assertion",
73
+
68
74
  /**
69
75
  * Activate the "sort-exports" plugin, which allows the "sort-exports" rule to be optionally
70
76
  * enabled on a per-project basis.
package/jsdoc.js CHANGED
@@ -61,6 +61,11 @@ module.exports = {
61
61
  // https://typescripttolua.github.io/docs/advanced/compiler-annotations
62
62
  "noResolution",
63
63
  "noSelf",
64
+
65
+ // Ignore tags used in ts-json-schema-generator:
66
+ // https://github.com/vega/ts-json-schema-generator
67
+ "minimum",
68
+ "maximum",
64
69
  ],
65
70
  },
66
71
  ],
@@ -168,7 +173,22 @@ module.exports = {
168
173
  ],
169
174
 
170
175
  // - jsdoc/require-param-type - Not needed in TypeScript.
176
+
171
177
  // - jsdoc/require-param - It's overboard for every function to document every parameter.
178
+ // TODO
179
+ /*
180
+ "jsdoc/require-param": [
181
+ "warn",
182
+ {
183
+ contexts: [
184
+ {
185
+ context: "FunctionDeclaration",
186
+ comment: 'JsdocBlock > JsdocTag[tag="param"]',
187
+ },
188
+ ],
189
+ },
190
+ ],
191
+ */
172
192
  // - jsdoc/require-property - Probably not needed in TypeScript.
173
193
 
174
194
  /**
package/mod.js CHANGED
@@ -3,8 +3,9 @@
3
3
  module.exports = {
4
4
  extends: [
5
5
  /**
6
- * The mod config extends the base configuration:
6
+ * The IsaacScript mod config extends the base configuration:
7
7
  * https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-config-isaacscript/base.js
8
+ * (Normal TypeScript projects would just use the base configuration directly.)
8
9
  */
9
10
  "./base",
10
11
  ],
@@ -52,6 +53,23 @@ module.exports = {
52
53
  },
53
54
  ],
54
55
 
56
+ /**
57
+ * Documentation:
58
+ * https://typescript-eslint.io/rules/no-base-to-string/
59
+ *
60
+ * Defined at:
61
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts
62
+ *
63
+ * The `Vector` object has a `tostring` meta-method, so it can be properly printed without
64
+ * explicitly specifying the X and Y values.
65
+ */
66
+ "@typescript-eslint/no-base-to-string": [
67
+ "warn",
68
+ {
69
+ ignoredTypeNames: ["Vector"],
70
+ },
71
+ ],
72
+
55
73
  /**
56
74
  * Documentation:
57
75
  * https://typescript-eslint.io/rules/no-invalid-void-type
@@ -82,6 +100,17 @@ module.exports = {
82
100
  */
83
101
  "@typescript-eslint/no-loop-func": "off",
84
102
 
103
+ /**
104
+ * Documentation:
105
+ * https://typescript-eslint.io/rules/prefer-literal-enum-member
106
+ *
107
+ * Defined at:
108
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts
109
+ *
110
+ * It is common to initialize enums with the `Isaac.GetEntityVariantByName` method.
111
+ */
112
+ "@typescript-eslint/prefer-literal-enum-member": "off",
113
+
85
114
  /**
86
115
  * Documentation:
87
116
  * https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-plugin-isaacscript/docs/rules/enum-member-number-separation.md
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
5
5
  "keywords": [
6
6
  "eslint",