eslint-config-isaacscript 1.0.84 → 1.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.
- package/README.md +1 -1
- package/base.js +14 -3
- package/jsdoc.js +4 -1
- package/mod.js +12 -2
- package/monorepo.js +43 -0
- package/package.json +16 -12
- package/CHANGELOG.md +0 -5
package/README.md
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
This is a sharable configuration for ESLint that is intended to be used in TypeScript and IsaacScript projects.
|
|
6
6
|
|
|
7
|
-
This package is consumed by the [`isaacscript-lint`](https://github.com/IsaacScript/isaacscript-lint) meta-linting package.
|
|
7
|
+
This package is consumed by the [`isaacscript-lint`](https://github.com/IsaacScript/isaacscript/tree/main/packages/isaacscript-lint) meta-linting package.
|
|
8
8
|
|
|
9
9
|
Please see the [IsaacScript webpage](https://isaacscript.github.io/) for more information.
|
package/base.js
CHANGED
|
@@ -32,7 +32,7 @@ module.exports = {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* This provides extra miscellaneous rules to keep code safe:
|
|
35
|
-
* https://github.com/IsaacScript/eslint-plugin-isaacscript
|
|
35
|
+
* https://github.com/IsaacScript/isaacscript/tree/main/packages/eslint-plugin-isaacscript
|
|
36
36
|
*/
|
|
37
37
|
"plugin:isaacscript/recommended",
|
|
38
38
|
|
|
@@ -375,8 +375,19 @@ module.exports = {
|
|
|
375
375
|
* https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js
|
|
376
376
|
*
|
|
377
377
|
* - Array destructuring can result in non-intuitive code.
|
|
378
|
-
* - Object destructuring is disgustingly verbose in TypeScript.
|
|
379
378
|
*/
|
|
380
|
-
"prefer-destructuring":
|
|
379
|
+
"prefer-destructuring": [
|
|
380
|
+
"warn",
|
|
381
|
+
{
|
|
382
|
+
VariableDeclarator: {
|
|
383
|
+
array: false,
|
|
384
|
+
object: true,
|
|
385
|
+
},
|
|
386
|
+
AssignmentExpression: {
|
|
387
|
+
array: false,
|
|
388
|
+
object: false,
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
],
|
|
381
392
|
},
|
|
382
393
|
};
|
package/jsdoc.js
CHANGED
|
@@ -18,7 +18,10 @@ module.exports = {
|
|
|
18
18
|
rules: {
|
|
19
19
|
// - jsdoc/check-access - Not needed in TypeScript.
|
|
20
20
|
// - jsdoc/check-alignment - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
// - jsdoc/check-examples - Does not work with ESLint 8; see:
|
|
23
|
+
// https://github.com/eslint/eslint/issues/14745
|
|
24
|
+
|
|
22
25
|
// - jsdoc/check-indentation - Overlaps with `isaacscript/limit-jsdoc-comments`.
|
|
23
26
|
// - jsdoc/check-line-alignment - This is not a common formatting scheme in the wild. It's also
|
|
24
27
|
// not recommended by the plugin.
|
package/mod.js
CHANGED
|
@@ -4,7 +4,7 @@ module.exports = {
|
|
|
4
4
|
extends: [
|
|
5
5
|
/**
|
|
6
6
|
* The mod config extends the base configuration:
|
|
7
|
-
* https://github.com/IsaacScript/eslint-config-isaacscript/
|
|
7
|
+
* https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-config-isaacscript/base.js
|
|
8
8
|
*/
|
|
9
9
|
"./base",
|
|
10
10
|
],
|
|
@@ -67,7 +67,7 @@ module.exports = {
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Documentation:
|
|
70
|
-
* https://github.com/IsaacScript/eslint-plugin-isaacscript/
|
|
70
|
+
* https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-plugin-isaacscript/main/docs/rules/enum-member-number-separation.md
|
|
71
71
|
*
|
|
72
72
|
* Not defined in the parent configs.
|
|
73
73
|
*
|
|
@@ -75,6 +75,16 @@ module.exports = {
|
|
|
75
75
|
*/
|
|
76
76
|
"isaacscript/enum-member-number-separation": "warn",
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Documentation:
|
|
80
|
+
* https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-plugin-isaacscript/main/docs/rules/no-invalid-default-map.md
|
|
81
|
+
*
|
|
82
|
+
* Not defined in the parent configs.
|
|
83
|
+
*
|
|
84
|
+
* Prevents misuse of the custom `DefaultMap` class in the standard library.
|
|
85
|
+
*/
|
|
86
|
+
"isaacscript/no-invalid-default-map": "warn",
|
|
87
|
+
|
|
78
88
|
/**
|
|
79
89
|
* Documentation:
|
|
80
90
|
* https://github.com/eslint/eslint/blob/master/docs/rules/no-bitwise.md
|
package/monorepo.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const path = require("path"); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
2
|
+
|
|
3
|
+
const REPO_ROOT = path.join(__dirname, "..", "..");
|
|
4
|
+
|
|
5
|
+
// This is a shared configuration file for ESLint:
|
|
6
|
+
// https://eslint.org/docs/user-guide/configuring
|
|
7
|
+
module.exports = {
|
|
8
|
+
plugins: ["@nrwl/nx"],
|
|
9
|
+
|
|
10
|
+
// From:
|
|
11
|
+
// https://github.com/nrwl/nx/blob/master/packages/eslint-plugin-nx/src/configs/typescript.ts
|
|
12
|
+
parserOptions: {
|
|
13
|
+
ecmaVersion: 2020,
|
|
14
|
+
sourceType: "module",
|
|
15
|
+
/* eslint-disable-next-line isaacscript/complete-sentences-line-comments */
|
|
16
|
+
// This cannot be simplified to "./../.." because of relative path shenanigans.
|
|
17
|
+
tsconfigRootDir: REPO_ROOT,
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
rules: {
|
|
21
|
+
"@nrwl/nx/enforce-module-boundaries": [
|
|
22
|
+
"warn",
|
|
23
|
+
{
|
|
24
|
+
enforceBuildableLibDependency: true,
|
|
25
|
+
allow: [],
|
|
26
|
+
depConstraints: [
|
|
27
|
+
{
|
|
28
|
+
sourceTag: "*",
|
|
29
|
+
onlyDependOnLibsWithTags: ["*"],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
// This rule has to be told which "package.json" file that the dependencies are located in.
|
|
36
|
+
"import/no-extraneous-dependencies": [
|
|
37
|
+
"warn",
|
|
38
|
+
{
|
|
39
|
+
packageDir: REPO_ROOT,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
};
|
package/package.json
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-isaacscript",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "A sharable ESLint config for TypeScript and IsaacScript projects.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"eslint",
|
|
7
|
+
"config",
|
|
8
|
+
"configs",
|
|
9
|
+
"isaacscript",
|
|
10
|
+
"lint",
|
|
11
|
+
"linting",
|
|
12
|
+
"prettier"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://isaacscript.github.io/",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/IsaacScript/isaacscript/issues"
|
|
17
|
+
},
|
|
5
18
|
"repository": {
|
|
6
19
|
"type": "git",
|
|
7
|
-
"url": "git+https://github.com/IsaacScript/
|
|
20
|
+
"url": "git+https://github.com/IsaacScript/isaacscript.git"
|
|
8
21
|
},
|
|
9
22
|
"license": "MIT",
|
|
10
23
|
"author": "Zamiell",
|
|
11
|
-
"
|
|
12
|
-
"base.js",
|
|
13
|
-
"mod.js",
|
|
14
|
-
"jsdoc.js"
|
|
15
|
-
],
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"cspell": "^5.21.0",
|
|
18
|
-
"isaacscript-spell": "^1.0.3",
|
|
19
|
-
"prettier": "^2.6.2"
|
|
20
|
-
}
|
|
24
|
+
"type": "commonjs"
|
|
21
25
|
}
|
package/CHANGELOG.md
DELETED