@darksheep/eslint 9.0.1 โ 10.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.
- package/CHANGELOG.md +41 -0
- package/package.json +17 -17
- package/src/custom-rules/instance-of-array.js +2 -1
- package/src/index.js +3 -3
- package/src/plugins/node.js +1 -1
- package/src/plugins/package-json.js +2 -3
- package/src/plugins/typescript.js +12 -4
- package/src/utilities/expand-glob.js +2 -2
- package/src/utilities/filesystem.js +1 -1
- package/src/utilities/package.js +1 -1
- package/types/eslint.config.d.ts +1 -1
- package/types/src/custom-logger/index.d.ts +1 -2
- package/types/src/utilities/package.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [10.0.0](https://github.com/DarkSheepSoftware/eslint/compare/v9.0.2...v10.0.0) (2025-11-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### โ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* remove type-fest
|
|
9
|
+
* enable typescript on all files its possible too
|
|
10
|
+
|
|
11
|
+
### ๐ Features
|
|
12
|
+
|
|
13
|
+
* enable return-await always ([9fd081b](https://github.com/DarkSheepSoftware/eslint/commit/9fd081b2d052fa41bdb870bc4455db0368b38f98))
|
|
14
|
+
* enable typescript on all files its possible too ([4f6d617](https://github.com/DarkSheepSoftware/eslint/commit/4f6d617fc249b960cdea44857f44f1ef5598a299))
|
|
15
|
+
* remove type-fest ([487dd16](https://github.com/DarkSheepSoftware/eslint/commit/487dd1648e59c7227ba9c7fbb450313a9bf7bffc))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### ๐ฆ Dependencies
|
|
19
|
+
|
|
20
|
+
* **pkg:** update dependency @eslint/compat to v1.4.1 ([c694920](https://github.com/DarkSheepSoftware/eslint/commit/c6949209d002d81be4bd93d1bd53dfda3ba8cf98))
|
|
21
|
+
* **pkg:** update dependency @stylistic/eslint-plugin to v5.5.0 ([fbf655f](https://github.com/DarkSheepSoftware/eslint/commit/fbf655fff75821b8726937f380af1b579b9b51b6))
|
|
22
|
+
* **pkg:** update dependency eslint-plugin-jest to v29.1.0 ([1778492](https://github.com/DarkSheepSoftware/eslint/commit/177849296b64977bf0cae74fb761eb628ce382b9))
|
|
23
|
+
* **pkg:** update dependency eslint-plugin-jsdoc to v61.1.1 ([#1056](https://github.com/DarkSheepSoftware/eslint/issues/1056)) ([b668a82](https://github.com/DarkSheepSoftware/eslint/commit/b668a829b6a965702fc8d6d73baf968838c9ec1b))
|
|
24
|
+
* **pkg:** update dependency eslint-plugin-jsdoc to v61.1.12 ([c82fbe7](https://github.com/DarkSheepSoftware/eslint/commit/c82fbe71b2a9deecbf23f51fef55dbb9b4a9fbb9))
|
|
25
|
+
* **pkg:** update dependency eslint-plugin-package-json to v0.65.3 ([2ad7837](https://github.com/DarkSheepSoftware/eslint/commit/2ad7837bee90dfe5f184db796f5b64b92e455541))
|
|
26
|
+
* **pkg:** update dependency eslint-plugin-unicorn to v62 ([92c0d8b](https://github.com/DarkSheepSoftware/eslint/commit/92c0d8bf3824e03a4b523833d2503d68190e51ff))
|
|
27
|
+
* **pkg:** update dependency eslint-plugin-unused-imports to v4.3.0 ([685e657](https://github.com/DarkSheepSoftware/eslint/commit/685e6576c526efad91ab19b9bb672d2cbdc4468c))
|
|
28
|
+
* **pkg:** update eslint monorepo to v9.39.1 ([2f10f27](https://github.com/DarkSheepSoftware/eslint/commit/2f10f2730d39bdfbf146da471a7adced9e749b89))
|
|
29
|
+
* **pkg:** update typescript-eslint monorepo to v8.46.4 ([bf7051d](https://github.com/DarkSheepSoftware/eslint/commit/bf7051d052f54eb48e42a5af8612ce15d6e88f65))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### ๐งน Chores
|
|
33
|
+
|
|
34
|
+
* eslint . --fix ([66dac10](https://github.com/DarkSheepSoftware/eslint/commit/66dac101e57ff2f29e401a45a16e784779907947))
|
|
35
|
+
|
|
36
|
+
## [9.0.2](https://github.com/DarkSheepSoftware/eslint/compare/v9.0.1...v9.0.2) (2025-10-11)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### ๐ฉน Fixes
|
|
40
|
+
|
|
41
|
+
* Disable no-top-level-await ([5f2b8db](https://github.com/DarkSheepSoftware/eslint/commit/5f2b8db0b758262c8ef83bbfb52ce19c7a28a058))
|
|
42
|
+
* disable require-type and require-version in private packages ([a486236](https://github.com/DarkSheepSoftware/eslint/commit/a4862368475bf96b42d9179ee087a27d14c74e15))
|
|
43
|
+
|
|
3
44
|
## [9.0.1](https://github.com/DarkSheepSoftware/eslint/compare/v9.0.0...v9.0.1) (2025-10-10)
|
|
4
45
|
|
|
5
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "A fairly complete (opinionated) eslint config",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,36 +26,36 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@darksheep/environment": "3.2.0",
|
|
28
28
|
"@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
|
|
29
|
-
"@eslint/compat": "1.4.
|
|
30
|
-
"@eslint/js": "9.
|
|
31
|
-
"@stylistic/eslint-plugin": "5.
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "8.46.
|
|
33
|
-
"@typescript-eslint/parser": "8.46.
|
|
29
|
+
"@eslint/compat": "1.4.1",
|
|
30
|
+
"@eslint/js": "9.39.1",
|
|
31
|
+
"@stylistic/eslint-plugin": "5.5.0",
|
|
32
|
+
"@typescript-eslint/eslint-plugin": "8.46.4",
|
|
33
|
+
"@typescript-eslint/parser": "8.46.4",
|
|
34
34
|
"editorconfig": "3.0.1",
|
|
35
35
|
"eslint-plugin-command": "3.3.1",
|
|
36
|
-
"eslint-plugin-jest": "29.0
|
|
37
|
-
"eslint-plugin-jsdoc": "61.1.
|
|
36
|
+
"eslint-plugin-jest": "29.1.0",
|
|
37
|
+
"eslint-plugin-jsdoc": "61.1.12",
|
|
38
38
|
"eslint-plugin-jsonc": "2.21.0",
|
|
39
39
|
"eslint-plugin-n": "17.23.1",
|
|
40
|
-
"eslint-plugin-package-json": "0.
|
|
40
|
+
"eslint-plugin-package-json": "0.65.3",
|
|
41
41
|
"eslint-plugin-perfectionist": "4.15.1",
|
|
42
42
|
"eslint-plugin-promise": "7.2.1",
|
|
43
43
|
"eslint-plugin-react": "7.37.5",
|
|
44
44
|
"eslint-plugin-react-native": "5.0.0",
|
|
45
45
|
"eslint-plugin-regexp": "2.10.0",
|
|
46
46
|
"eslint-plugin-security": "3.0.1",
|
|
47
|
-
"eslint-plugin-unicorn": "
|
|
48
|
-
"eslint-plugin-unused-imports": "4.
|
|
47
|
+
"eslint-plugin-unicorn": "62.0.0",
|
|
48
|
+
"eslint-plugin-unused-imports": "4.3.0",
|
|
49
49
|
"eslint-plugin-yml": "1.19.0",
|
|
50
50
|
"jsonc-eslint-parser": "2.4.1",
|
|
51
51
|
"yaml-eslint-parser": "1.3.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@darksheep/eslint-formatter-github": "2.2.0",
|
|
55
|
+
"@darksheep/package.json": "~3.1.0",
|
|
55
56
|
"@eslint/config-inspector": "~1.3.0",
|
|
56
|
-
"@types/node": "~
|
|
57
|
-
"eslint": "~9.
|
|
58
|
-
"type-fest": "~5.0.0",
|
|
57
|
+
"@types/node": "~24.10.0",
|
|
58
|
+
"eslint": "~9.39.0",
|
|
59
59
|
"typescript": "~5.9.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependenciesMeta": {
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"optional": true
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
|
-
"packageManager": "yarn@4.
|
|
69
|
+
"packageManager": "yarn@4.11.0",
|
|
70
70
|
"engines": {
|
|
71
71
|
"node": "^20.13.1 || >=22.2.0"
|
|
72
72
|
},
|
|
73
73
|
"volta": {
|
|
74
|
-
"node": "
|
|
75
|
-
"yarn": "4.
|
|
74
|
+
"node": "24.11.0",
|
|
75
|
+
"yarn": "4.11.0"
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -19,7 +19,8 @@ const preferInstance = (context) => ({
|
|
|
19
19
|
const message = 'Use `instanceof Array` instead of `Array.isArray()`';
|
|
20
20
|
|
|
21
21
|
if (node.arguments.length !== 1) {
|
|
22
|
-
|
|
22
|
+
context.report({ node, message });
|
|
23
|
+
return;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
const left = context.sourceCode.getText(node.arguments[0]);
|
package/src/index.js
CHANGED
|
@@ -63,7 +63,7 @@ const configBuilders = [
|
|
|
63
63
|
*/
|
|
64
64
|
async function createConfigUrl(root) {
|
|
65
65
|
const configs = await Promise.all(
|
|
66
|
-
configBuilders.map((builder) => builder(root)),
|
|
66
|
+
configBuilders.map(async (builder) => await builder(root)),
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
return configs.flat();
|
|
@@ -75,7 +75,7 @@ async function createConfigUrl(root) {
|
|
|
75
75
|
*/
|
|
76
76
|
export async function createConfig(root) {
|
|
77
77
|
if (root instanceof URL) {
|
|
78
|
-
return createConfigUrl(root);
|
|
78
|
+
return await createConfigUrl(root);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
if (typeof root !== 'string') {
|
|
@@ -92,5 +92,5 @@ export async function createConfig(root) {
|
|
|
92
92
|
throw new Error('Cannot compute filepath');
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
return createConfigUrl(pathToFileURL(filepath));
|
|
95
|
+
return await createConfigUrl(pathToFileURL(filepath));
|
|
96
96
|
}
|
package/src/plugins/node.js
CHANGED
|
@@ -35,6 +35,7 @@ const commonRules = {
|
|
|
35
35
|
'n/no-process-exit': 'warn',
|
|
36
36
|
'n/no-restricted-import': 'off',
|
|
37
37
|
'n/no-restricted-require': 'off',
|
|
38
|
+
'n/no-top-level-await': 'off',
|
|
38
39
|
'n/no-unpublished-bin': 'error',
|
|
39
40
|
'n/no-unpublished-import': [ 'error', { ignoreTypeImport: true } ],
|
|
40
41
|
'n/no-unpublished-require': 'error',
|
|
@@ -98,7 +99,6 @@ export async function createEslintNodeConfig(root) {
|
|
|
98
99
|
'n/no-sync': [ 'error', { allowAtRootLevel: true } ],
|
|
99
100
|
'n/no-extraneous-require': 'error',
|
|
100
101
|
'n/no-missing-require': 'error',
|
|
101
|
-
'n/no-top-level-await': 'error',
|
|
102
102
|
|
|
103
103
|
'n/no-unsupported-features/es-syntax': [ 'error', { ignores: [] } ],
|
|
104
104
|
},
|
|
@@ -12,7 +12,6 @@ export async function createEslintPackageJsonConfig() {
|
|
|
12
12
|
return [
|
|
13
13
|
{
|
|
14
14
|
name: 'package-json/custom',
|
|
15
|
-
// @ts-expect-error
|
|
16
15
|
plugins: { 'package-json': plugin },
|
|
17
16
|
languageOptions: {
|
|
18
17
|
parser: jsoncParser,
|
|
@@ -36,9 +35,9 @@ export async function createEslintPackageJsonConfig() {
|
|
|
36
35
|
'package-json/require-name': 'error',
|
|
37
36
|
'package-json/require-optionalDependencies': 'off',
|
|
38
37
|
'package-json/require-peerDependencies': 'off',
|
|
39
|
-
'package-json/require-type': [ 'error', { ignorePrivate:
|
|
38
|
+
'package-json/require-type': [ 'error', { ignorePrivate: true } ],
|
|
40
39
|
'package-json/require-types': 'off',
|
|
41
|
-
'package-json/require-version': [ 'error', { ignorePrivate:
|
|
40
|
+
'package-json/require-version': [ 'error', { ignorePrivate: true } ],
|
|
42
41
|
'package-json/restrict-dependency-ranges': 'off',
|
|
43
42
|
'package-json/sort-collections': 'error',
|
|
44
43
|
'package-json/unique-dependencies': 'error',
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
* @import { URL } from 'node:url';
|
|
3
3
|
* @import { Linter } from 'eslint';
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
getCommonFiles,
|
|
7
|
+
getModuleFiles,
|
|
8
|
+
getTypescriptFiles,
|
|
9
|
+
} from '../utilities/eslint-files.js';
|
|
6
10
|
import { getPackageJson } from '../utilities/package.js';
|
|
7
11
|
|
|
8
12
|
/**
|
|
@@ -30,7 +34,11 @@ export async function createEslintTypescriptConfig(root) {
|
|
|
30
34
|
|
|
31
35
|
return [ {
|
|
32
36
|
name: 'typescript/custom',
|
|
33
|
-
files:
|
|
37
|
+
files: [
|
|
38
|
+
...await getCommonFiles(root),
|
|
39
|
+
...await getModuleFiles(root),
|
|
40
|
+
...getTypescriptFiles(),
|
|
41
|
+
],
|
|
34
42
|
languageOptions: {
|
|
35
43
|
parser: typescriptParser,
|
|
36
44
|
sourceType: 'module',
|
|
@@ -141,10 +149,10 @@ export async function createEslintTypescriptConfig(root) {
|
|
|
141
149
|
'@typescript-eslint/promise-function-async': 'off',
|
|
142
150
|
'@typescript-eslint/related-getter-setter-pairs': 'off',
|
|
143
151
|
'@typescript-eslint/require-array-sort-compare': 'off',
|
|
144
|
-
'@typescript-eslint/require-await': '
|
|
152
|
+
'@typescript-eslint/require-await': 'off',
|
|
145
153
|
'@typescript-eslint/restrict-plus-operands': 'error',
|
|
146
154
|
'@typescript-eslint/restrict-template-expressions': 'off',
|
|
147
|
-
'@typescript-eslint/return-await': '
|
|
155
|
+
'@typescript-eslint/return-await': [ 'warn', 'always' ],
|
|
148
156
|
'@typescript-eslint/strict-boolean-expressions': 'error',
|
|
149
157
|
'@typescript-eslint/switch-exhaustiveness-check': 'off',
|
|
150
158
|
'@typescript-eslint/typedef': 'off',
|
|
@@ -6,7 +6,7 @@ const globEachRegex = /\{[\w\-.]+(?:,[\w\-.]+)*\}/u;
|
|
|
6
6
|
* @returns {string[]}
|
|
7
7
|
*/
|
|
8
8
|
export function expandGlob(input) {
|
|
9
|
-
const globNumMatch =
|
|
9
|
+
const globNumMatch = globNumRegex.exec(input);
|
|
10
10
|
if (typeof globNumMatch?.index === 'number') {
|
|
11
11
|
const first = input.slice(0, globNumMatch.index);
|
|
12
12
|
const each = globNumMatch[0];
|
|
@@ -28,7 +28,7 @@ export function expandGlob(input) {
|
|
|
28
28
|
return output.flatMap(expandGlob);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
const globEachMatch =
|
|
31
|
+
const globEachMatch = globEachRegex.exec(input);
|
|
32
32
|
if (typeof globEachMatch?.index === 'number') {
|
|
33
33
|
const first = input.slice(0, globEachMatch.index);
|
|
34
34
|
const each = globEachMatch[0];
|
|
@@ -109,7 +109,7 @@ export async function findInPaths(paths, filename) {
|
|
|
109
109
|
* @returns {Promise<string|null>} Returns absolute path to the closest {filename} if found.
|
|
110
110
|
*/
|
|
111
111
|
export async function findUp(rootFilePath, filename, stopDirectory = Path.resolve('/')) {
|
|
112
|
-
return findInPaths(
|
|
112
|
+
return await findInPaths(
|
|
113
113
|
await listParents(rootFilePath, stopDirectory),
|
|
114
114
|
filename,
|
|
115
115
|
);
|
package/src/utilities/package.js
CHANGED
package/types/eslint.config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const _default: (import("eslint").Linter.Config<import("eslint").
|
|
1
|
+
declare const _default: (import("eslint").Linter.Config<import(".store/@eslint-core-npm-0.17.0-8579df04c4/package", { with: { "resolution-mode": "require" } }).RulesConfig> | {
|
|
2
2
|
rules: {
|
|
3
3
|
'max-lines-per-function': number;
|
|
4
4
|
};
|
|
@@ -2,9 +2,8 @@ declare const _default: {
|
|
|
2
2
|
processors: {
|
|
3
3
|
logger: {
|
|
4
4
|
supportsAutofix: true;
|
|
5
|
-
postprocess: (messages:
|
|
5
|
+
postprocess: (messages: import(".store/@eslint-core-npm-0.17.0-8579df04c4/package", { with: { "resolution-mode": "require" } }).LintMessage[][], filename: string) => import(".store/@eslint-core-npm-0.17.0-8579df04c4/package", { with: { "resolution-mode": "require" } }).LintMessage[];
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
8
|
};
|
|
9
9
|
export default _default;
|
|
10
|
-
import type { Linter } from 'eslint';
|