eslint-config-complete 2.3.0 → 3.0.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.
- package/dist/base/base-complete.d.ts.map +1 -1
- package/dist/base/base-complete.js +4 -3
- package/dist/base/base-import-x.d.ts.map +1 -1
- package/dist/base/base-import-x.js +1 -0
- package/dist/base/base-jsdoc.d.ts.map +1 -1
- package/dist/base/base-jsdoc.js +12 -0
- package/dist/base/base-typescript-eslint.d.ts.map +1 -1
- package/dist/base/base-typescript-eslint.js +7 -3
- package/dist/base.d.ts.map +1 -1
- package/dist/base.js +2 -3
- package/package.json +7 -8
- package/dist/base/base-package-json.d.ts +0 -6
- package/dist/base/base-package-json.d.ts.map +0 -1
- package/dist/base/base-package-json.js +0 -96
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-complete.d.ts","sourceRoot":"","sources":["../../src/base/base-complete.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base-complete.d.ts","sourceRoot":"","sources":["../../src/base/base-complete.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,iGAkEE"}
|
|
@@ -52,9 +52,10 @@ export const baseComplete = defineConfig({
|
|
|
52
52
|
"complete/strict-undefined-functions": "warn",
|
|
53
53
|
"complete/strict-void-functions": "warn",
|
|
54
54
|
},
|
|
55
|
-
//
|
|
56
|
-
//
|
|
57
|
-
|
|
55
|
+
// Rules that require type information will throw an error on ".json" files. (This is needed
|
|
56
|
+
// when using `eslint-plugin-package-json`. Even though this config does not currently use the
|
|
57
|
+
// plugin, we include it here defensively.)
|
|
58
|
+
ignores: ["*.json", "*.jsonc"],
|
|
58
59
|
}, {
|
|
59
60
|
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.jsx"],
|
|
60
61
|
rules: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-import-x.d.ts","sourceRoot":"","sources":["../../src/base/base-import-x.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-import-x.d.ts","sourceRoot":"","sources":["../../src/base/base-import-x.js"],"names":[],"mappings":"AA0OA;;;;;;;;;GASG;AACH,gGAgHE"}
|
|
@@ -43,6 +43,7 @@ const HELPFUL_WARNINGS = {
|
|
|
43
43
|
"**/.eslintrc.js", // eslint config
|
|
44
44
|
"**/scripts/**/*.{js,cjs,mjs,ts,cts,mts}", // Files inside of a "scripts" directory.
|
|
45
45
|
"**/tests/**/*.{js,cjs,mjs,ts,cts,mts}", // Files inside of a "tests" directory.
|
|
46
|
+
"**/esbuild.config.{js,cjs,mjs,ts,cts,mts}", // esbuild config
|
|
46
47
|
"**/eslint.config.{js,cjs,mjs,ts,cts,mts}", // ESLint config
|
|
47
48
|
"**/prettier.config.{js,cjs,mjs,ts,cts,mts}", // Prettier config
|
|
48
49
|
"**/typedoc.config.{js,cjs,mjs,ts,cts,mts}", // TypeDoc config
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-jsdoc.d.ts","sourceRoot":"","sources":["../../src/base/base-jsdoc.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base-jsdoc.d.ts","sourceRoot":"","sources":["../../src/base/base-jsdoc.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,8FAsRE"}
|
package/dist/base/base-jsdoc.js
CHANGED
|
@@ -112,6 +112,8 @@ export const baseJSDoc = defineConfig({
|
|
|
112
112
|
],
|
|
113
113
|
/** Disabled because it is not needed in TypeScript. */
|
|
114
114
|
"jsdoc/no-undefined-types": "off",
|
|
115
|
+
"jsdoc/reject-any-type": "warn",
|
|
116
|
+
"jsdoc/reject-function-type": "warn",
|
|
115
117
|
"jsdoc/require-asterisk-prefix": "warn",
|
|
116
118
|
/** Disabled because it is overboard for every function to have a description. */
|
|
117
119
|
"jsdoc/require-description": "off",
|
|
@@ -128,6 +130,16 @@ export const baseJSDoc = defineConfig({
|
|
|
128
130
|
"jsdoc/require-hyphen-before-param-description": ["warn", "never"],
|
|
129
131
|
/** Disabled since it is overboard for every function to have a JSDoc comment. */
|
|
130
132
|
"jsdoc/require-jsdoc": "off",
|
|
133
|
+
"jsdoc/require-next-description": "warn",
|
|
134
|
+
"jsdoc/require-next-type": "warn",
|
|
135
|
+
"jsdoc/require-throws-description": "warn",
|
|
136
|
+
/**
|
|
137
|
+
* Disabled since in most cases, the type of a thrown error will simply be `Error`, making the
|
|
138
|
+
* annotation superfluous.
|
|
139
|
+
*/
|
|
140
|
+
"jsdoc/require-throws-type": "off",
|
|
141
|
+
"jsdoc/require-yields-description": "warn",
|
|
142
|
+
"jsdoc/require-yields-type": "warn",
|
|
131
143
|
/** Configured to only apply when there are one or more parameters. */
|
|
132
144
|
"jsdoc/require-param": [
|
|
133
145
|
"warn",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,yGA8jBE"}
|
|
@@ -23,6 +23,9 @@ export const baseTypeScriptESLint = defineConfig({
|
|
|
23
23
|
"babel.config.mjs",
|
|
24
24
|
"eslint.config.js",
|
|
25
25
|
"eslint.config.cjs",
|
|
26
|
+
"esbuild.config.js",
|
|
27
|
+
"esbuild.config.cjs",
|
|
28
|
+
"esbuild.config.mjs",
|
|
26
29
|
"eslint.config.mjs",
|
|
27
30
|
"eslint.config.ts",
|
|
28
31
|
"eslint.config.cts",
|
|
@@ -451,9 +454,10 @@ export const baseTypeScriptESLint = defineConfig({
|
|
|
451
454
|
"@typescript-eslint/unified-signatures": "warn",
|
|
452
455
|
"@typescript-eslint/use-unknown-in-catch-callback-variable": "warn",
|
|
453
456
|
},
|
|
454
|
-
//
|
|
455
|
-
//
|
|
456
|
-
|
|
457
|
+
// Rules that require type information will throw an error on ".json" files. (This is needed
|
|
458
|
+
// when using `eslint-plugin-package-json`. Even though this config does not currently use the
|
|
459
|
+
// plugin, we include it here defensively.)
|
|
460
|
+
ignores: ["*.json", "*.jsonc"],
|
|
457
461
|
},
|
|
458
462
|
// Enable linting on TypeScript file extensions.
|
|
459
463
|
{
|
package/dist/base.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.js"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,uGA0BE"}
|
package/dist/base.js
CHANGED
|
@@ -4,7 +4,6 @@ import { baseESLint } from "./base/base-eslint.js";
|
|
|
4
4
|
import { baseImportX } from "./base/base-import-x.js";
|
|
5
5
|
import { baseJSDoc } from "./base/base-jsdoc.js";
|
|
6
6
|
import { baseN } from "./base/base-n.js";
|
|
7
|
-
import { basePackageJSON } from "./base/base-package-json.js";
|
|
8
7
|
import { baseStylistic } from "./base/base-stylistic.js";
|
|
9
8
|
import { baseTypeScriptESLint } from "./base/base-typescript-eslint.js";
|
|
10
9
|
import { baseUnicorn } from "./base/base-unicorn.js";
|
|
@@ -15,7 +14,7 @@ import { baseUnicorn } from "./base/base-unicorn.js";
|
|
|
15
14
|
* originating plugin) .
|
|
16
15
|
*/
|
|
17
16
|
export const completeConfigBase = defineConfig(...baseESLint, ...baseTypeScriptESLint, ...baseStylistic, ...baseImportX, ...baseJSDoc, ...baseN, // "n" stands for Node.
|
|
18
|
-
...
|
|
17
|
+
...baseUnicorn, ...baseComplete,
|
|
19
18
|
// We prefer the official `reportUnusedDisableDirectives` linter option over the 3rd-party plugin
|
|
20
19
|
// of "eslint-plugin-eslint-comments".
|
|
21
20
|
{
|
|
@@ -25,7 +24,7 @@ export const completeConfigBase = defineConfig(...baseESLint, ...baseTypeScriptE
|
|
|
25
24
|
}, {
|
|
26
25
|
// By default, ESLint ignores "**/node_modules/" and ".git/":
|
|
27
26
|
// https://eslint.org/docs/latest/use/configure/ignore#ignoring-files
|
|
28
|
-
// We also
|
|
27
|
+
// We also want to ignore:
|
|
29
28
|
// - The "dist" directory, since it is the idiomatic place for compiled output in TypeScript.
|
|
30
29
|
// - Minified JavaScript files.
|
|
31
30
|
ignores: ["**/dist/", "*.min.js"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-complete",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "A sharable ESLint config for TypeScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -35,23 +35,22 @@
|
|
|
35
35
|
"@stylistic/eslint-plugin": "5.3.1",
|
|
36
36
|
"confusing-browser-globals": "1.0.11",
|
|
37
37
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
38
|
-
"eslint-plugin-complete": "1.1.
|
|
38
|
+
"eslint-plugin-complete": "1.1.3",
|
|
39
39
|
"eslint-plugin-eslint-plugin": "7.0.0",
|
|
40
40
|
"eslint-plugin-import-x": "4.16.1",
|
|
41
|
-
"eslint-plugin-jsdoc": "
|
|
42
|
-
"eslint-plugin-n": "17.
|
|
43
|
-
"eslint-plugin-package-json": "0.56.2",
|
|
41
|
+
"eslint-plugin-jsdoc": "59.0.1",
|
|
42
|
+
"eslint-plugin-n": "17.23.1",
|
|
44
43
|
"eslint-plugin-unicorn": "61.0.2",
|
|
45
44
|
"jsonc-eslint-parser": "2.4.0",
|
|
46
|
-
"typescript-eslint": "8.
|
|
45
|
+
"typescript-eslint": "8.44.0"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@eslint/js": "9.35.0",
|
|
50
49
|
"@types/confusing-browser-globals": "1.0.3",
|
|
51
50
|
"@types/eslint-config-prettier": "6.11.3",
|
|
52
|
-
"@types/node": "24.
|
|
51
|
+
"@types/node": "24.5.2",
|
|
53
52
|
"complete-common": "2.5.0",
|
|
54
|
-
"complete-node": "
|
|
53
|
+
"complete-node": "12.0.0",
|
|
55
54
|
"eslint-config-prettier": "10.1.8",
|
|
56
55
|
"extract-comments": "1.1.0",
|
|
57
56
|
"typescript": "5.9.2"
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This ESLint config only contains rules from `eslint-plugin-package-json`:
|
|
3
|
-
* https://github.com/JoshuaKGoldberg/eslint-plugin-package-json
|
|
4
|
-
*/
|
|
5
|
-
export const basePackageJSON: import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[];
|
|
6
|
-
//# sourceMappingURL=base-package-json.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-package-json.d.ts","sourceRoot":"","sources":["../../src/base/base-package-json.js"],"names":[],"mappings":"AAIA;;;GAGG;AACH,oGAiHG"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import ESLintPluginPackageJSON from "eslint-plugin-package-json";
|
|
2
|
-
import { defineConfig } from "eslint/config";
|
|
3
|
-
import * as parserJsonc from "jsonc-eslint-parser";
|
|
4
|
-
/**
|
|
5
|
-
* This ESLint config only contains rules from `eslint-plugin-package-json`:
|
|
6
|
-
* https://github.com/JoshuaKGoldberg/eslint-plugin-package-json
|
|
7
|
-
*/
|
|
8
|
-
export const basePackageJSON = defineConfig({
|
|
9
|
-
plugins: {
|
|
10
|
-
// @ts-expect-error https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues/1242
|
|
11
|
-
"package-json": ESLintPluginPackageJSON,
|
|
12
|
-
},
|
|
13
|
-
files: ["**/package.json"],
|
|
14
|
-
languageOptions: {
|
|
15
|
-
parser: parserJsonc,
|
|
16
|
-
parserOptions: {
|
|
17
|
-
extraFileExtensions: [".json"],
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
rules: {
|
|
21
|
-
"package-json/no-empty-fields": "warn",
|
|
22
|
-
"package-json/no-redundant-files": "warn",
|
|
23
|
-
/** Disabled since it is handled by `prettier-plugin-packagejson`. */
|
|
24
|
-
"package-json/order-properties": "off",
|
|
25
|
-
"package-json/repository-shorthand": "warn",
|
|
26
|
-
/**
|
|
27
|
-
* Disabled since it is only needed for public npm packages, which is too specific for this
|
|
28
|
-
* config.
|
|
29
|
-
*/
|
|
30
|
-
"package-json/require-author": "off",
|
|
31
|
-
/**
|
|
32
|
-
* Disabled since it is only needed for public npm packages, which is too specific for this
|
|
33
|
-
* config.
|
|
34
|
-
*/
|
|
35
|
-
"package-json/require-bugs": "off",
|
|
36
|
-
/** Disabled since most projects do not use `bundleDependencies`. */
|
|
37
|
-
"package-json/require-bundleDependencies": "off",
|
|
38
|
-
/** Disabled since not all projects have `dependencies`. */
|
|
39
|
-
"package-json/require-dependencies": "off",
|
|
40
|
-
/**
|
|
41
|
-
* Disabled since it is only needed for public npm packages, which is too specific for this
|
|
42
|
-
* config. (It is superfluous as long as a "README.md" file exists.)
|
|
43
|
-
*/
|
|
44
|
-
"package-json/require-description": "off",
|
|
45
|
-
/** Disabled since not all projects have `devDependencies`. */
|
|
46
|
-
"package-json/require-devDependencies": "off",
|
|
47
|
-
/** Disabled since not all projects have engine version constraints. */
|
|
48
|
-
"package-json/require-engines": "off",
|
|
49
|
-
/**
|
|
50
|
-
* Disabled since it is only needed for public npm packages, which is too specific for this
|
|
51
|
-
* config.
|
|
52
|
-
*/
|
|
53
|
-
"package-json/require-files": "off",
|
|
54
|
-
/**
|
|
55
|
-
* Disabled since it is only needed for public npm packages, which is too specific for this
|
|
56
|
-
* config.
|
|
57
|
-
*/
|
|
58
|
-
"package-json/require-keywords": "off",
|
|
59
|
-
"package-json/require-name": "warn",
|
|
60
|
-
/** Disabled since not all projects have `optionalDependencies`. */
|
|
61
|
-
"package-json/require-optionalDependencies": "off",
|
|
62
|
-
/** Disabled since not all projects have `peerDependencies`. */
|
|
63
|
-
"package-json/require-peerDependencies": "off",
|
|
64
|
-
"package-json/require-type": "warn",
|
|
65
|
-
/** Disabled since this is only needed for libraries. */
|
|
66
|
-
"package-json/require-types": "off",
|
|
67
|
-
/** Disabled since some private packages may not use versioning. */
|
|
68
|
-
"package-json/require-version": "off",
|
|
69
|
-
/** Disabled since this is supposed to be a project-specific rule. */
|
|
70
|
-
"package-json/restrict-dependency-ranges": "off",
|
|
71
|
-
/** Disabled since it is handled by `prettier-plugin-packagejson`. */
|
|
72
|
-
"package-json/sort-collections": "off",
|
|
73
|
-
"package-json/unique-dependencies": "warn",
|
|
74
|
-
"package-json/valid-author": "warn",
|
|
75
|
-
"package-json/valid-bin": "warn",
|
|
76
|
-
"package-json/valid-bundleDependencies": "warn",
|
|
77
|
-
"package-json/valid-config": "warn",
|
|
78
|
-
"package-json/valid-cpu": "warn",
|
|
79
|
-
"package-json/valid-dependencies": "warn",
|
|
80
|
-
"package-json/valid-description": "warn",
|
|
81
|
-
"package-json/valid-devDependencies": "warn",
|
|
82
|
-
"package-json/valid-directories": "warn",
|
|
83
|
-
"package-json/valid-exports": "warn",
|
|
84
|
-
"package-json/valid-license": "warn",
|
|
85
|
-
/** Disabled since the rule is deprecated. */
|
|
86
|
-
"package-json/valid-local-dependency": "off",
|
|
87
|
-
"package-json/valid-name": "warn",
|
|
88
|
-
"package-json/valid-optionalDependencies": "warn",
|
|
89
|
-
"package-json/valid-package-definition": "warn",
|
|
90
|
-
"package-json/valid-peerDependencies": "warn",
|
|
91
|
-
"package-json/valid-repository-directory": "warn",
|
|
92
|
-
"package-json/valid-scripts": "warn",
|
|
93
|
-
"package-json/valid-type": "warn",
|
|
94
|
-
"package-json/valid-version": "warn",
|
|
95
|
-
},
|
|
96
|
-
});
|