eslint-config-isaacscript 3.0.0 → 3.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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // This is a shared configuration file for ESLint:
2
- // https://eslint.org/docs/user-guide/configuring
2
+ // https://eslint.org/docs/latest/user-guide/configuring
3
3
  module.exports = {
4
4
  extends: [
5
5
  /**
@@ -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.
@@ -401,15 +407,10 @@ module.exports = {
401
407
  * Defined at:
402
408
  * https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/style.js
403
409
  *
404
- * Airbnb disallows these because it can lead to errors with minified code. We don't have to
405
- * worry about this in for loops though.
410
+ * Airbnb disallows these because it can lead to errors with minified code. When using Prettier,
411
+ * it adds semi-colons everywhere, so we don't have to worry about this.
406
412
  */
407
- "no-plusplus": [
408
- "warn",
409
- {
410
- allowForLoopAfterthoughts: true,
411
- },
412
- ],
413
+ "no-plusplus": "off",
413
414
 
414
415
  /**
415
416
  * Documentation:
package/jsdoc.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // This is a shared configuration file for ESLint:
2
- // https://eslint.org/docs/user-guide/configuring
2
+ // https://eslint.org/docs/latest/user-guide/configuring
3
3
  module.exports = {
4
4
  plugins: [
5
5
  /**
@@ -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,18 @@ 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: ["any"],
184
+ },
185
+ ],
186
+ */
187
+
172
188
  // - jsdoc/require-property - Probably not needed in TypeScript.
173
189
 
174
190
  /**
package/mod.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // This is a shared configuration file for ESLint:
2
- // https://eslint.org/docs/user-guide/configuring
2
+ // https://eslint.org/docs/latest/user-guide/configuring
3
3
  module.exports = {
4
4
  extends: [
5
5
  /**
@@ -52,6 +52,23 @@ module.exports = {
52
52
  },
53
53
  ],
54
54
 
55
+ /**
56
+ * Documentation:
57
+ * https://typescript-eslint.io/rules/no-base-to-string/
58
+ *
59
+ * Defined at:
60
+ * https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/strict.ts
61
+ *
62
+ * The `Vector` object has a `tostring` meta-method, so it can be properly printed without
63
+ * explicitly specifying the X and Y values.
64
+ */
65
+ "@typescript-eslint/no-base-to-string": [
66
+ "warn",
67
+ {
68
+ ignoredTypeNames: ["Vector"],
69
+ },
70
+ ],
71
+
55
72
  /**
56
73
  * Documentation:
57
74
  * https://typescript-eslint.io/rules/no-invalid-void-type
package/monorepo.js CHANGED
@@ -3,7 +3,7 @@ const path = require("path"); // eslint-disable-line @typescript-eslint/no-var-r
3
3
  const REPO_ROOT = path.join(__dirname, "..", "..");
4
4
 
5
5
  // This is a shared configuration file for ESLint:
6
- // https://eslint.org/docs/user-guide/configuring
6
+ // https://eslint.org/docs/latest/user-guide/configuring
7
7
  module.exports = {
8
8
  plugins: ["@nrwl/nx"],
9
9
 
@@ -12,8 +12,7 @@ module.exports = {
12
12
  parserOptions: {
13
13
  ecmaVersion: 2020,
14
14
  sourceType: "module",
15
- /* eslint-disable-next-line isaacscript/complete-sentences-line-comments */
16
- // This cannot be simplified to "./../.." because of relative path shenanigans.
15
+ // This cannot be simplified to `./../..` because of relative path shenanigans.
17
16
  tsconfigRootDir: REPO_ROOT,
18
17
  },
19
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-isaacscript",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
5
5
  "keywords": [
6
6
  "eslint",