eslint-config-complete 2.3.0 → 3.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"base-complete.d.ts","sourceRoot":"","sources":["../../src/base/base-complete.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,iGAiEE"}
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
- // Having TypeScript rules apply to ".json" files will throw an error about needing type
56
- // information.
57
- ignores: ["*.json"],
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-jsdoc.d.ts","sourceRoot":"","sources":["../../src/base/base-jsdoc.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,8FAuQE"}
1
+ {"version":3,"file":"base-jsdoc.d.ts","sourceRoot":"","sources":["../../src/base/base-jsdoc.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,8FAiRE"}
@@ -128,6 +128,13 @@ export const baseJSDoc = defineConfig({
128
128
  "jsdoc/require-hyphen-before-param-description": ["warn", "never"],
129
129
  /** Disabled since it is overboard for every function to have a JSDoc comment. */
130
130
  "jsdoc/require-jsdoc": "off",
131
+ "jsdoc/require-next-type": "warn",
132
+ /**
133
+ * Disabled since in most cases, the type of a thrown error will simply be `Error`, making the
134
+ * annotation superfluous.
135
+ */
136
+ "jsdoc/require-throws-type": "off",
137
+ "jsdoc/require-yields-type": "warn",
131
138
  /** Configured to only apply when there are one or more parameters. */
132
139
  "jsdoc/require-param": [
133
140
  "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,yGA0jBE"}
1
+ {"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,yGA2jBE"}
@@ -451,9 +451,10 @@ export const baseTypeScriptESLint = defineConfig({
451
451
  "@typescript-eslint/unified-signatures": "warn",
452
452
  "@typescript-eslint/use-unknown-in-catch-callback-variable": "warn",
453
453
  },
454
- // Having TypeScript rules apply to ".json" files will throw an error about needing type
455
- // information.
456
- ignores: ["*.json"],
454
+ // Rules that require type information will throw an error on ".json" files. (This is needed
455
+ // when using `eslint-plugin-package-json`. Even though this config does not currently use the
456
+ // plugin, we include it here defensively.)
457
+ ignores: ["*.json", "*.jsonc"],
457
458
  },
458
459
  // Enable linting on TypeScript file extensions.
459
460
  {
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../src/base.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,uGA2BE"}
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
- ...basePackageJSON, ...baseUnicorn, ...baseComplete,
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 ignore want to ignore:
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": "2.3.0",
3
+ "version": "3.0.0",
4
4
  "description": "A sharable ESLint config for TypeScript projects.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -38,9 +38,8 @@
38
38
  "eslint-plugin-complete": "1.1.2",
39
39
  "eslint-plugin-eslint-plugin": "7.0.0",
40
40
  "eslint-plugin-import-x": "4.16.1",
41
- "eslint-plugin-jsdoc": "56.0.2",
42
- "eslint-plugin-n": "17.21.3",
43
- "eslint-plugin-package-json": "0.56.2",
41
+ "eslint-plugin-jsdoc": "57.0.8",
42
+ "eslint-plugin-n": "17.22.0",
44
43
  "eslint-plugin-unicorn": "61.0.2",
45
44
  "jsonc-eslint-parser": "2.4.0",
46
45
  "typescript-eslint": "8.43.0"
@@ -49,9 +48,9 @@
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.3.1",
51
+ "@types/node": "24.4.0",
53
52
  "complete-common": "2.5.0",
54
- "complete-node": "10.0.0",
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
- });