eslint-config-complete 2.0.1 → 2.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.
- package/dist/base/base-eslint.js +3 -3
- package/dist/base/base-import-x.js +4 -4
- package/dist/base/base-jsdoc.d.ts.map +1 -1
- package/dist/base/base-jsdoc.js +1 -5
- package/dist/base/base-typescript-eslint.d.ts.map +1 -1
- package/dist/base/base-typescript-eslint.js +19 -22
- package/dist/base/base-unicorn.d.ts.map +1 -1
- package/dist/base/base-unicorn.js +4 -0
- package/package.json +12 -12
package/dist/base/base-eslint.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import confusingBrowserGlobals from "confusing-browser-globals";
|
|
2
2
|
import tseslint from "typescript-eslint";
|
|
3
3
|
/**
|
|
4
|
-
* @see https://eslint.org/docs/latest/rules/#possible-problems
|
|
5
4
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
5
|
+
* @see https://eslint.org/docs/latest/rules/#possible-problems
|
|
6
6
|
*/
|
|
7
7
|
const POSSIBLE_PROBLEMS = {
|
|
8
8
|
/** The `checkForEach` option is enabled to make the rule stricter. */
|
|
@@ -79,8 +79,8 @@ const POSSIBLE_PROBLEMS = {
|
|
|
79
79
|
"valid-typeof": "warn",
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
82
|
-
* @see https://eslint.org/docs/latest/rules/#suggestions
|
|
83
82
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
83
|
+
* @see https://eslint.org/docs/latest/rules/#suggestions
|
|
84
84
|
*/
|
|
85
85
|
const SUGGESTIONS = {
|
|
86
86
|
"accessor-pairs": "warn",
|
|
@@ -494,8 +494,8 @@ const SUGGESTIONS = {
|
|
|
494
494
|
yoda: "warn",
|
|
495
495
|
};
|
|
496
496
|
/**
|
|
497
|
-
* @see https://eslint.org/docs/latest/rules/#suggestions
|
|
498
497
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
498
|
+
* @see https://eslint.org/docs/latest/rules/#suggestions
|
|
499
499
|
*/
|
|
500
500
|
const LAYOUT_AND_FORMATTING = {
|
|
501
501
|
"unicode-bom": "warn",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import ESLintPluginImportX from "eslint-plugin-import-x";
|
|
2
2
|
import tseslint from "typescript-eslint";
|
|
3
3
|
/**
|
|
4
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#helpful-warnings
|
|
5
4
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
5
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#helpful-warnings
|
|
6
6
|
*/
|
|
7
7
|
const HELPFUL_WARNINGS = {
|
|
8
8
|
"import-x/export": "warn",
|
|
@@ -70,8 +70,8 @@ const HELPFUL_WARNINGS = {
|
|
|
70
70
|
"import-x/no-unused-modules": "off",
|
|
71
71
|
};
|
|
72
72
|
/**
|
|
73
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#module-systems
|
|
74
73
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
74
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#module-systems
|
|
75
75
|
*/
|
|
76
76
|
const MODULE_SYSTEMS = {
|
|
77
77
|
"import-x/no-amd": "warn",
|
|
@@ -83,8 +83,8 @@ const MODULE_SYSTEMS = {
|
|
|
83
83
|
"import-x/unambiguous": "off",
|
|
84
84
|
};
|
|
85
85
|
/**
|
|
86
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#static-analysis
|
|
87
86
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
87
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#static-analysis
|
|
88
88
|
*/
|
|
89
89
|
const STATIC_ANALYSIS = {
|
|
90
90
|
/**
|
|
@@ -124,8 +124,8 @@ const STATIC_ANALYSIS = {
|
|
|
124
124
|
"import-x/no-webpack-loader-syntax": "warn",
|
|
125
125
|
};
|
|
126
126
|
/**
|
|
127
|
-
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#style-guide
|
|
128
127
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
128
|
+
* @see https://github.com/un-ts/eslint-plugin-import-x/blob/master/README.md#style-guide
|
|
129
129
|
*/
|
|
130
130
|
const STYLE_GUIDE = {
|
|
131
131
|
"import-x/consistent-type-specifier-style": "warn",
|
|
@@ -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,4FAqQE"}
|
package/dist/base/base-jsdoc.js
CHANGED
|
@@ -183,11 +183,7 @@ export const baseJSDoc = tseslint.config({
|
|
|
183
183
|
"jsdoc/require-yields": "off",
|
|
184
184
|
/** Disabled because it is overboard to document every yield. */
|
|
185
185
|
"jsdoc/require-yields-check": "off",
|
|
186
|
-
|
|
187
|
-
* Disabled because it is not very useful. In most cases, a function will only have `@param`
|
|
188
|
-
* and `@return` tags, making sorting unnecessary.
|
|
189
|
-
*/
|
|
190
|
-
"jsdoc/sort-tags": "off",
|
|
186
|
+
"jsdoc/sort-tags": "warn",
|
|
191
187
|
/** Superseded by the `complete/format-jsdoc-comments` rule. */
|
|
192
188
|
"jsdoc/tag-lines": "off",
|
|
193
189
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base-typescript-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-typescript-eslint.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,uGAsjBE"}
|
|
@@ -78,7 +78,13 @@ export const baseTypeScriptESLint = tseslint.config({
|
|
|
78
78
|
"@typescript-eslint/class-methods-use-this": "warn",
|
|
79
79
|
"@typescript-eslint/consistent-generic-constructors": "warn",
|
|
80
80
|
"@typescript-eslint/consistent-indexed-object-style": "warn",
|
|
81
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Disabled since this is handled by the `noImplicitReturns` TypeScript compiler flag. (The
|
|
83
|
+
* compiler flag does not technically handle all cases that the rule does. However, in most
|
|
84
|
+
* cases, it will result in duplicate error messages being thrown, so we disable it.
|
|
85
|
+
* Additionally, more coverage of this nature is also provided by the
|
|
86
|
+
* `complete/strict-void-functions` rule.)
|
|
87
|
+
*/
|
|
82
88
|
"@typescript-eslint/consistent-return": "off",
|
|
83
89
|
"@typescript-eslint/consistent-type-assertions": "warn",
|
|
84
90
|
"@typescript-eslint/consistent-type-definitions": "warn",
|
|
@@ -471,27 +477,18 @@ export const baseTypeScriptESLint = tseslint.config({
|
|
|
471
477
|
rules: {
|
|
472
478
|
"@typescript-eslint/no-floating-promises": "off",
|
|
473
479
|
},
|
|
474
|
-
},
|
|
475
|
-
|
|
476
|
-
//
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
"
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
//
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
files: ["**/tests/**"],
|
|
487
|
-
rules: {
|
|
488
|
-
"@typescript-eslint/no-restricted-imports": "off",
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
// ESLint configs in monorepos often intentionally import from the "src" subdirectory (because the
|
|
492
|
-
// config files are JavaScript so they cannot use tsconfig-paths).
|
|
493
|
-
{
|
|
494
|
-
files: ["eslint.config.mjs"],
|
|
480
|
+
}, {
|
|
481
|
+
files: [
|
|
482
|
+
// ESLint configs in monorepos often intentionally import from the "src" subdirectory (because
|
|
483
|
+
// the config files are JavaScript so they cannot use tsconfig-paths).
|
|
484
|
+
"eslint.config.mjs",
|
|
485
|
+
// We want to be allowed to import from the "src" directory in script files that are located
|
|
486
|
+
// in a separate "scripts" directory.
|
|
487
|
+
"**/scripts/**",
|
|
488
|
+
// We want to be allowed to import from the "src" directory in test files that are located in
|
|
489
|
+
// a separate "tests" directory.
|
|
490
|
+
"**/tests/**",
|
|
491
|
+
],
|
|
495
492
|
rules: {
|
|
496
493
|
"@typescript-eslint/no-restricted-imports": "off",
|
|
497
494
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-unicorn.d.ts","sourceRoot":"","sources":["../../src/base/base-unicorn.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base-unicorn.d.ts","sourceRoot":"","sources":["../../src/base/base-unicorn.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,8FA8LG"}
|
|
@@ -41,6 +41,7 @@ export const baseUnicorn = tseslint.config({
|
|
|
41
41
|
"unicorn/no-array-method-this-argument": "warn",
|
|
42
42
|
"unicorn/no-array-push-push": "warn",
|
|
43
43
|
"unicorn/no-array-reduce": "warn",
|
|
44
|
+
"unicorn/no-array-reverse": "warn",
|
|
44
45
|
"unicorn/no-await-expression-member": "warn",
|
|
45
46
|
"unicorn/no-await-in-promise-methods": "warn",
|
|
46
47
|
"unicorn/no-console-spaces": "warn",
|
|
@@ -84,6 +85,7 @@ export const baseUnicorn = tseslint.config({
|
|
|
84
85
|
"unicorn/no-unreadable-array-destructuring": "warn",
|
|
85
86
|
"unicorn/no-unreadable-iife": "warn",
|
|
86
87
|
"unicorn/no-unused-properties": "warn",
|
|
88
|
+
"unicorn/no-useless-error-capture-stack-trace": "warn",
|
|
87
89
|
"unicorn/no-useless-fallback-in-spread": "warn",
|
|
88
90
|
"unicorn/no-useless-length-check": "warn",
|
|
89
91
|
"unicorn/no-useless-promise-resolve-reject": "warn",
|
|
@@ -102,6 +104,7 @@ export const baseUnicorn = tseslint.config({
|
|
|
102
104
|
"unicorn/prefer-array-some": "warn",
|
|
103
105
|
"unicorn/prefer-at": "warn",
|
|
104
106
|
"unicorn/prefer-blob-reading-methods": "warn",
|
|
107
|
+
"unicorn/prefer-class-fields": "warn",
|
|
105
108
|
"unicorn/prefer-code-point": "warn",
|
|
106
109
|
"unicorn/prefer-date-now": "warn",
|
|
107
110
|
"unicorn/prefer-default-parameters": "warn",
|
|
@@ -151,6 +154,7 @@ export const baseUnicorn = tseslint.config({
|
|
|
151
154
|
"unicorn/prevent-abbreviations": "off",
|
|
152
155
|
"unicorn/relative-url-style": "warn",
|
|
153
156
|
"unicorn/require-array-join-separator": "warn",
|
|
157
|
+
"unicorn/require-module-specifiers": "warn",
|
|
154
158
|
"unicorn/require-number-to-fixed-digits-argument": "warn",
|
|
155
159
|
/** Disabled since it is not recommended by the plugin authors. */
|
|
156
160
|
"unicorn/require-post-message-target-origin": "off",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-complete",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "A sharable ESLint config for TypeScript projects.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -35,25 +35,25 @@
|
|
|
35
35
|
"lint": "tsx ./scripts/lint.ts"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@stylistic/eslint-plugin": "5.2.
|
|
38
|
+
"@stylistic/eslint-plugin": "5.2.3",
|
|
39
39
|
"confusing-browser-globals": "1.0.11",
|
|
40
40
|
"eslint-import-resolver-typescript": "4.4.4",
|
|
41
|
-
"eslint-plugin-complete": "1.1.
|
|
41
|
+
"eslint-plugin-complete": "1.1.2",
|
|
42
42
|
"eslint-plugin-import-x": "4.16.1",
|
|
43
|
-
"eslint-plugin-jsdoc": "
|
|
44
|
-
"eslint-plugin-n": "17.21.
|
|
45
|
-
"eslint-plugin-unicorn": "
|
|
46
|
-
"typescript-eslint": "8.
|
|
43
|
+
"eslint-plugin-jsdoc": "52.0.4",
|
|
44
|
+
"eslint-plugin-n": "17.21.3",
|
|
45
|
+
"eslint-plugin-unicorn": "60.0.0",
|
|
46
|
+
"typescript-eslint": "8.39.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@eslint/js": "9.
|
|
49
|
+
"@eslint/js": "9.32.0",
|
|
50
50
|
"@types/confusing-browser-globals": "1.0.3",
|
|
51
51
|
"@types/eslint-config-prettier": "6.11.3",
|
|
52
|
-
"@types/node": "24.
|
|
53
|
-
"complete-common": "2.
|
|
54
|
-
"complete-node": "
|
|
52
|
+
"@types/node": "24.2.1",
|
|
53
|
+
"complete-common": "2.5.0",
|
|
54
|
+
"complete-node": "9.0.0",
|
|
55
55
|
"eslint-config-prettier": "10.1.8",
|
|
56
56
|
"extract-comments": "1.1.0",
|
|
57
|
-
"typescript": "5.
|
|
57
|
+
"typescript": "5.9.2"
|
|
58
58
|
}
|
|
59
59
|
}
|