@darksheep/eslint 10.0.6 โ 10.1.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 +44 -0
- package/package.json +27 -25
- package/src/configs/eslint-base.js +1 -1
- package/src/plugins/jsdoc.js +3 -1
- package/src/plugins/json.js +5 -4
- package/src/plugins/package-json.js +3 -0
- package/src/plugins/perfectionist.js +18 -2
- package/src/plugins/typescript.js +4 -1
- package/src/plugins/unicorn.js +4 -0
- package/src/types.d.ts +8 -8
- package/types/tests/helpers/linter.d.ts +30 -0
- package/types/tests/import-sorting.test.d.ts +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [10.1.0](https://github.com/DarkSheepSoftware/eslint/compare/v10.0.7...v10.1.0) (2026-04-08)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ๐ Features
|
|
7
|
+
|
|
8
|
+
* **eslint:** enforce import sorting and add test coverage ([33ba946](https://github.com/DarkSheepSoftware/eslint/commit/33ba946d9427757d1b1e7085c28a84dc20bd93a7))
|
|
9
|
+
* **rules:** add new rules from updated plugins ([164a21c](https://github.com/DarkSheepSoftware/eslint/commit/164a21c0c234e71629b104f2c4fd6452847ccfae))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### ๐ฉน Fixes
|
|
13
|
+
|
|
14
|
+
* TypeScript 6.0 compatibility ([f399585](https://github.com/DarkSheepSoftware/eslint/commit/f39958594669731d164e0d791e8385c039cead72))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### ๐ฆ Dependencies
|
|
18
|
+
|
|
19
|
+
* **pkg:** update dependency @eslint/compat to v2.0.3 ([#1164](https://github.com/DarkSheepSoftware/eslint/issues/1164)) ([f577187](https://github.com/DarkSheepSoftware/eslint/commit/f577187058ebe86ee48564ea014fc68f3884b98e))
|
|
20
|
+
* **pkg:** update dependency @stylistic/eslint-plugin to v5.10.0 ([#1162](https://github.com/DarkSheepSoftware/eslint/issues/1162)) ([2493c7f](https://github.com/DarkSheepSoftware/eslint/commit/2493c7f749eb9a73ffc48cd9c8cf3b53649d5b70))
|
|
21
|
+
* **pkg:** update dependency eslint-plugin-package-json to v0.90.0 ([#1160](https://github.com/DarkSheepSoftware/eslint/issues/1160)) ([a8a47dc](https://github.com/DarkSheepSoftware/eslint/commit/a8a47dc79d9724c76ca0cdbe01a6922b5616c95c))
|
|
22
|
+
* **pkg:** update dependency eslint-plugin-regexp to v3.1.0 ([#1165](https://github.com/DarkSheepSoftware/eslint/issues/1165)) ([04a35b1](https://github.com/DarkSheepSoftware/eslint/commit/04a35b1cbdf8ba4900eb3169fdc049eff16ccb14))
|
|
23
|
+
* **pkg:** update typescript-eslint monorepo to v8.57.0 ([#1166](https://github.com/DarkSheepSoftware/eslint/issues/1166)) ([e1a453f](https://github.com/DarkSheepSoftware/eslint/commit/e1a453f71e67d19843c30872ce3a6773ee20f42c))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### ๐งน Chores
|
|
27
|
+
|
|
28
|
+
* eslint --fix . ([155878c](https://github.com/DarkSheepSoftware/eslint/commit/155878c01fab1f94460555bed704e2515c0fb1df))
|
|
29
|
+
* ignore .claude and CLAUDE.md ([3baea57](https://github.com/DarkSheepSoftware/eslint/commit/3baea579ce038feca73e5e45e32f1682de6d6a57))
|
|
30
|
+
* why >,< ([006eda5](https://github.com/DarkSheepSoftware/eslint/commit/006eda596932c70844d2389917281aa94fc1bff1))
|
|
31
|
+
|
|
32
|
+
## [10.0.7](https://github.com/DarkSheepSoftware/eslint/compare/v10.0.6...v10.0.7) (2026-03-01)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
### ๐ฆ Dependencies
|
|
36
|
+
|
|
37
|
+
* **pkg:** update dependency @eslint-community/eslint-plugin-eslint-comments to v4.7.0 ([#1155](https://github.com/DarkSheepSoftware/eslint/issues/1155)) ([e1190e2](https://github.com/DarkSheepSoftware/eslint/commit/e1190e2222bf603604ad3a043de9f99b7aa944d9))
|
|
38
|
+
* **pkg:** update dependency editorconfig to v3.0.2 ([#1154](https://github.com/DarkSheepSoftware/eslint/issues/1154)) ([a4e6ca1](https://github.com/DarkSheepSoftware/eslint/commit/a4e6ca19aabe9d600e363bcc22f32fd76ca3d807))
|
|
39
|
+
* **pkg:** update dependency eslint-plugin-jsdoc to v62.7.1 ([#1148](https://github.com/DarkSheepSoftware/eslint/issues/1148)) ([b84918a](https://github.com/DarkSheepSoftware/eslint/commit/b84918a4e44b9c284ef33f58fd999498b410af73))
|
|
40
|
+
* **pkg:** update dependency eslint-plugin-jsonc to v3 ([#1137](https://github.com/DarkSheepSoftware/eslint/issues/1137)) ([4d2e219](https://github.com/DarkSheepSoftware/eslint/commit/4d2e2197b6b3e277d7b11402d71a2655dbd84f57))
|
|
41
|
+
* **pkg:** update dependency eslint-plugin-jsonc to v3.1.1 ([#1151](https://github.com/DarkSheepSoftware/eslint/issues/1151)) ([bdf30ed](https://github.com/DarkSheepSoftware/eslint/commit/bdf30edcfb2c2176864ce15821fca2ed2518fdae))
|
|
42
|
+
* **pkg:** update dependency eslint-plugin-package-json to v0.89.2 ([#1153](https://github.com/DarkSheepSoftware/eslint/issues/1153)) ([533637b](https://github.com/DarkSheepSoftware/eslint/commit/533637b02abbfe98d7f042f8c2a0f7336e5c7dc1))
|
|
43
|
+
* **pkg:** update dependency eslint-plugin-yml to v3.2.2 ([#1143](https://github.com/DarkSheepSoftware/eslint/issues/1143)) ([c50cca7](https://github.com/DarkSheepSoftware/eslint/commit/c50cca791d5211ec348a7ddf4b62222d8d30e26f))
|
|
44
|
+
* **pkg:** update dependency eslint-plugin-yml to v3.3.0 ([#1146](https://github.com/DarkSheepSoftware/eslint/issues/1146)) ([1a5bf07](https://github.com/DarkSheepSoftware/eslint/commit/1a5bf07d0623fbc5a67ab00df9c355942d393013))
|
|
45
|
+
* **pkg:** update typescript-eslint monorepo to v8.56.1 ([#1147](https://github.com/DarkSheepSoftware/eslint/issues/1147)) ([2054d06](https://github.com/DarkSheepSoftware/eslint/commit/2054d060b0765b8b243a59ae8dbab4f13788bfab))
|
|
46
|
+
|
|
3
47
|
## [10.0.6](https://github.com/DarkSheepSoftware/eslint/compare/v10.0.5...v10.0.6) (2026-02-22)
|
|
4
48
|
|
|
5
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@darksheep/eslint",
|
|
3
|
-
"version": "10.0
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "A fairly complete (opinionated) eslint config",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,42 +21,44 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"githooks": "git config core.hooksPath .githooks",
|
|
23
23
|
"inspect": "config-inspector",
|
|
24
|
-
"prepack": "tsc"
|
|
24
|
+
"prepack": "tsc",
|
|
25
|
+
"test": "node --test"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"@darksheep/environment": "3.2.0",
|
|
28
|
-
"@eslint-community/eslint-plugin-eslint-comments": "4.
|
|
29
|
-
"@eslint/compat": "2.0.
|
|
30
|
-
"@eslint/js": "9.39.
|
|
31
|
-
"@stylistic/eslint-plugin": "5.
|
|
32
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
33
|
-
"@typescript-eslint/parser": "8.
|
|
34
|
-
"editorconfig": "3.0.
|
|
35
|
-
"eslint-plugin-command": "3.
|
|
36
|
-
"eslint-plugin-jest": "29.15.
|
|
37
|
-
"eslint-plugin-jsdoc": "62.
|
|
38
|
-
"eslint-plugin-jsonc": "
|
|
29
|
+
"@eslint-community/eslint-plugin-eslint-comments": "4.7.1",
|
|
30
|
+
"@eslint/compat": "2.0.5",
|
|
31
|
+
"@eslint/js": "9.39.4",
|
|
32
|
+
"@stylistic/eslint-plugin": "5.10.0",
|
|
33
|
+
"@typescript-eslint/eslint-plugin": "8.58.1",
|
|
34
|
+
"@typescript-eslint/parser": "8.58.1",
|
|
35
|
+
"editorconfig": "3.0.2",
|
|
36
|
+
"eslint-plugin-command": "3.5.2",
|
|
37
|
+
"eslint-plugin-jest": "29.15.1",
|
|
38
|
+
"eslint-plugin-jsdoc": "62.9.0",
|
|
39
|
+
"eslint-plugin-jsonc": "3.1.2",
|
|
39
40
|
"eslint-plugin-n": "17.24.0",
|
|
40
|
-
"eslint-plugin-package-json": "0.
|
|
41
|
-
"eslint-plugin-perfectionist": "5.
|
|
41
|
+
"eslint-plugin-package-json": "0.91.1",
|
|
42
|
+
"eslint-plugin-perfectionist": "5.8.0",
|
|
42
43
|
"eslint-plugin-promise": "7.2.1",
|
|
43
44
|
"eslint-plugin-react": "7.37.5",
|
|
44
45
|
"eslint-plugin-react-native": "5.0.0",
|
|
45
|
-
"eslint-plugin-regexp": "3.
|
|
46
|
+
"eslint-plugin-regexp": "3.1.0",
|
|
46
47
|
"eslint-plugin-security": "4.0.0",
|
|
47
|
-
"eslint-plugin-unicorn": "
|
|
48
|
+
"eslint-plugin-unicorn": "64.0.0",
|
|
48
49
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
49
|
-
"eslint-plugin-yml": "3.
|
|
50
|
+
"eslint-plugin-yml": "3.3.1",
|
|
50
51
|
"jsonc-eslint-parser": "3.1.0",
|
|
51
52
|
"yaml-eslint-parser": "2.0.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
55
|
"@darksheep/eslint-formatter-github": "2.2.0",
|
|
55
56
|
"@darksheep/package.json": "~3.1.0",
|
|
56
|
-
"@eslint/config-inspector": "~1.
|
|
57
|
-
"@types/node": "~24.
|
|
58
|
-
"
|
|
59
|
-
"
|
|
57
|
+
"@eslint/config-inspector": "~1.5.0",
|
|
58
|
+
"@types/node": "~24.12.0",
|
|
59
|
+
"dedent": "~1.7.2",
|
|
60
|
+
"eslint": "~9.39.4",
|
|
61
|
+
"typescript": "~6.0.0"
|
|
60
62
|
},
|
|
61
63
|
"peerDependenciesMeta": {
|
|
62
64
|
"eslint": {
|
|
@@ -66,12 +68,12 @@
|
|
|
66
68
|
"optional": true
|
|
67
69
|
}
|
|
68
70
|
},
|
|
69
|
-
"packageManager": "yarn@4.
|
|
71
|
+
"packageManager": "yarn@4.13.0",
|
|
70
72
|
"engines": {
|
|
71
73
|
"node": "^20.13.1 || >=22.2.0"
|
|
72
74
|
},
|
|
73
75
|
"volta": {
|
|
74
|
-
"node": "24.
|
|
75
|
-
"yarn": "4.
|
|
76
|
+
"node": "24.14.1",
|
|
77
|
+
"yarn": "4.13.0"
|
|
76
78
|
}
|
|
77
79
|
}
|
|
@@ -37,7 +37,7 @@ const rules = {
|
|
|
37
37
|
'no-class-assign': 'error',
|
|
38
38
|
'no-const-assign': 'error',
|
|
39
39
|
'no-dupe-class-members': 'error',
|
|
40
|
-
'no-duplicate-imports': 'error',
|
|
40
|
+
'no-duplicate-imports': [ 'error', { allowSeparateTypeImports: true } ],
|
|
41
41
|
'no-new-native-nonconstructor': 'error',
|
|
42
42
|
'no-restricted-imports': 'error',
|
|
43
43
|
'no-this-before-super': 'error',
|
package/src/plugins/jsdoc.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import jsdoc from 'eslint-plugin-jsdoc';
|
|
5
5
|
|
|
6
|
-
import { getTypescriptFiles } from '../utilities/eslint-files.js';
|
|
6
|
+
import { getTestFiles, getTypescriptFiles } from '../utilities/eslint-files.js';
|
|
7
7
|
import { getPackageJson } from '../utilities/package.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -19,6 +19,7 @@ export async function createEslintJSDocConfig(root) {
|
|
|
19
19
|
{
|
|
20
20
|
name: 'jsdoc/javascript',
|
|
21
21
|
plugins: { jsdoc },
|
|
22
|
+
ignores: getTestFiles(),
|
|
22
23
|
settings: {
|
|
23
24
|
jsdoc: {
|
|
24
25
|
mode: 'typescript',
|
|
@@ -111,6 +112,7 @@ export async function createEslintJSDocConfig(root) {
|
|
|
111
112
|
{
|
|
112
113
|
name: 'jsdoc/typescript',
|
|
113
114
|
files: getTypescriptFiles(),
|
|
115
|
+
ignores: getTestFiles(),
|
|
114
116
|
rules: {
|
|
115
117
|
'jsdoc/no-types': 'warn',
|
|
116
118
|
'jsdoc/check-types': 'off',
|
package/src/plugins/json.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import { ok } from 'node:assert';
|
|
6
6
|
|
|
7
|
-
import jsonc from 'eslint-plugin-jsonc';
|
|
7
|
+
import * as jsonc from 'eslint-plugin-jsonc';
|
|
8
8
|
import * as parser from 'jsonc-eslint-parser';
|
|
9
9
|
|
|
10
|
-
const jsonRules = jsonc.configs['recommended-with-json']
|
|
11
|
-
const jsoncRules = jsonc.configs['recommended-with-jsonc']
|
|
12
|
-
const json5Rules = jsonc.configs['recommended-with-json5']
|
|
10
|
+
const jsonRules = jsonc.configs['recommended-with-json']?.at(-1)?.rules;
|
|
11
|
+
const jsoncRules = jsonc.configs['recommended-with-jsonc']?.at(-1)?.rules;
|
|
12
|
+
const json5Rules = jsonc.configs['recommended-with-json5']?.at(-1)?.rules;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Get ESLint config for imports check.
|
|
@@ -25,6 +25,7 @@ export async function createEslintJsonConfig() {
|
|
|
25
25
|
name: 'json/core',
|
|
26
26
|
files: [ '**/*.json', '**/*.jsonc', '**/*.json5' ],
|
|
27
27
|
languageOptions: { parser },
|
|
28
|
+
// @ts-expect-error -- This used to work >,<
|
|
28
29
|
plugins: { jsonc },
|
|
29
30
|
rules: {
|
|
30
31
|
'jsonc/auto': 'off',
|
|
@@ -23,12 +23,14 @@ export async function createEslintPackageJsonConfig() {
|
|
|
23
23
|
'package-json/require-author': 'off',
|
|
24
24
|
'package-json/require-bugs': 'off',
|
|
25
25
|
'package-json/require-bundleDependencies': 'off',
|
|
26
|
+
'package-json/require-cpu': 'off',
|
|
26
27
|
'package-json/require-dependencies': 'off',
|
|
27
28
|
'package-json/require-description': [ 'warn', { ignorePrivate: true } ],
|
|
28
29
|
'package-json/require-devDependencies': 'off',
|
|
29
30
|
'package-json/require-engines': [ 'warn', { ignorePrivate: true } ],
|
|
30
31
|
'package-json/require-files': [ 'warn', { ignorePrivate: true } ],
|
|
31
32
|
'package-json/require-keywords': 'off',
|
|
33
|
+
'package-json/require-module': 'off',
|
|
32
34
|
'package-json/require-name': 'error',
|
|
33
35
|
'package-json/require-optionalDependencies': 'off',
|
|
34
36
|
'package-json/require-peerDependencies': 'off',
|
|
@@ -46,6 +48,7 @@ export async function createEslintPackageJsonConfig() {
|
|
|
46
48
|
'package-json/valid-dependencies': 'warn',
|
|
47
49
|
'package-json/valid-description': 'warn',
|
|
48
50
|
'package-json/valid-devDependencies': 'warn',
|
|
51
|
+
'package-json/valid-devEngines': 'warn',
|
|
49
52
|
'package-json/valid-directories': 'warn',
|
|
50
53
|
'package-json/valid-exports': 'warn',
|
|
51
54
|
'package-json/valid-license': 'warn',
|
|
@@ -31,6 +31,7 @@ const commonRules = {
|
|
|
31
31
|
],
|
|
32
32
|
},
|
|
33
33
|
],
|
|
34
|
+
'perfectionist/sort-array': 0,
|
|
34
35
|
'perfectionist/sort-array-includes': 0,
|
|
35
36
|
'perfectionist/sort-decorators': 'off',
|
|
36
37
|
'perfectionist/sort-heritage-clauses': 'off',
|
|
@@ -53,12 +54,27 @@ const moduleRules = {
|
|
|
53
54
|
{
|
|
54
55
|
type: 'natural',
|
|
55
56
|
order: 'asc',
|
|
56
|
-
newlinesBetween:
|
|
57
|
+
newlinesBetween: 0,
|
|
58
|
+
customGroups: [
|
|
59
|
+
{ groupName: 'builtin-type', modifiers: [ 'type' ], selector: 'builtin' },
|
|
60
|
+
{ groupName: 'external-type', modifiers: [ 'type' ], selector: 'external' },
|
|
61
|
+
{ groupName: 'internal-type', modifiers: [ 'type' ], selector: 'internal' },
|
|
62
|
+
{ groupName: 'parent-type', modifiers: [ 'type' ], selector: 'parent' },
|
|
63
|
+
{ groupName: 'sibling-type', modifiers: [ 'type' ], selector: 'sibling' },
|
|
64
|
+
{ groupName: 'index-type', modifiers: [ 'type' ], selector: 'index' },
|
|
65
|
+
],
|
|
57
66
|
groups: [
|
|
58
|
-
'type',
|
|
67
|
+
'builtin-type',
|
|
68
|
+
'external-type',
|
|
69
|
+
'internal-type',
|
|
70
|
+
{ newlinesBetween: 1 },
|
|
71
|
+
[ 'parent-type', 'sibling-type', 'index-type' ],
|
|
72
|
+
{ newlinesBetween: 1 },
|
|
59
73
|
'builtin',
|
|
74
|
+
{ newlinesBetween: 1 },
|
|
60
75
|
'external',
|
|
61
76
|
'internal',
|
|
77
|
+
{ newlinesBetween: 1 },
|
|
62
78
|
[ 'parent', 'sibling', 'index' ],
|
|
63
79
|
'unknown',
|
|
64
80
|
],
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @import { URL } from 'node:url';
|
|
3
3
|
* @import { Linter } from 'eslint';
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
import {
|
|
6
7
|
getCommonFiles,
|
|
7
8
|
getModuleFiles,
|
|
@@ -173,9 +174,11 @@ export async function createEslintTypescriptConfig(root) {
|
|
|
173
174
|
name: 'typescript/ts',
|
|
174
175
|
files: getTypescriptFiles(),
|
|
175
176
|
rules: {
|
|
177
|
+
'@typescript-eslint/no-import-type-side-effects': [ 'error' ],
|
|
176
178
|
'@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: true } ],
|
|
177
179
|
'@typescript-eslint/consistent-type-imports': [ 'error', {
|
|
178
|
-
|
|
180
|
+
disallowTypeAnnotations: true,
|
|
181
|
+
fixStyle: 'separate-type-imports',
|
|
179
182
|
prefer: 'type-imports',
|
|
180
183
|
} ],
|
|
181
184
|
'@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
|
package/src/plugins/unicorn.js
CHANGED
|
@@ -35,6 +35,7 @@ export async function createEslintUnicornConfig(root) {
|
|
|
35
35
|
'unicorn/consistent-empty-array-spread': 'error',
|
|
36
36
|
'unicorn/consistent-existence-index-check': 'warn',
|
|
37
37
|
'unicorn/consistent-function-scoping': 'warn',
|
|
38
|
+
'unicorn/consistent-template-literal-escape': 'warn',
|
|
38
39
|
'unicorn/custom-error-definition': 'off',
|
|
39
40
|
'unicorn/empty-brace-spaces': 'off',
|
|
40
41
|
'unicorn/error-message': 'error',
|
|
@@ -90,6 +91,7 @@ export async function createEslintUnicornConfig(root) {
|
|
|
90
91
|
'unicorn/no-unused-properties': 'off',
|
|
91
92
|
'unicorn/no-useless-error-capture-stack-trace': 'warn',
|
|
92
93
|
'unicorn/no-useless-fallback-in-spread': 'warn',
|
|
94
|
+
'unicorn/no-useless-iterator-to-array': 'warn',
|
|
93
95
|
'unicorn/no-useless-length-check': 'error',
|
|
94
96
|
'unicorn/no-useless-promise-resolve-reject': 'error',
|
|
95
97
|
'unicorn/no-useless-spread': 'error',
|
|
@@ -140,6 +142,7 @@ export async function createEslintUnicornConfig(root) {
|
|
|
140
142
|
'unicorn/prefer-regexp-test': 'warn',
|
|
141
143
|
'unicorn/prefer-set-has': 'warn',
|
|
142
144
|
'unicorn/prefer-set-size': 'error',
|
|
145
|
+
'unicorn/prefer-simple-condition-first': 'warn',
|
|
143
146
|
'unicorn/prefer-single-call': 'warn',
|
|
144
147
|
'unicorn/prefer-spread': 'error',
|
|
145
148
|
'unicorn/prefer-string-raw': 'warn',
|
|
@@ -160,6 +163,7 @@ export async function createEslintUnicornConfig(root) {
|
|
|
160
163
|
'unicorn/require-post-message-target-origin': 'error',
|
|
161
164
|
'unicorn/string-content': 'off',
|
|
162
165
|
'unicorn/switch-case-braces': 'error',
|
|
166
|
+
'unicorn/switch-case-break-position': 'warn',
|
|
163
167
|
'unicorn/template-indent': 'off',
|
|
164
168
|
'unicorn/text-encoding-identifier-case': 'error',
|
|
165
169
|
'unicorn/throw-new-error': 'error',
|
package/src/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
declare module '@eslint/js' {
|
|
7
|
-
import {
|
|
7
|
+
import type { ESLint } from 'eslint';
|
|
8
8
|
export default {
|
|
9
9
|
configs: {
|
|
10
10
|
all: WithRequired<ESLint.ConfigData, 'rules'>,
|
|
@@ -16,22 +16,22 @@ declare module '@eslint/js' {
|
|
|
16
16
|
type WithRequired<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
17
17
|
|
|
18
18
|
declare module '@eslint-community/eslint-plugin-eslint-comments' {
|
|
19
|
-
import {
|
|
19
|
+
import type { ESLint } from 'eslint';
|
|
20
20
|
export default {} as ESLint.Plugin;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
declare module 'eslint-plugin-perfectionist' {
|
|
24
|
-
import {
|
|
24
|
+
import type { ESLint } from 'eslint';
|
|
25
25
|
export default {} as ESLint.Plugin;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
declare module '@stylistic/eslint-plugin' {
|
|
29
|
-
import {
|
|
29
|
+
import type { ESLint } from 'eslint';
|
|
30
30
|
export default {} as WithRequired<ESLint.Plugin, 'environments'>;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
declare module 'eslint-plugin-promise' {
|
|
34
|
-
import {
|
|
34
|
+
import type { ESLint } from 'eslint';
|
|
35
35
|
export default {} as {
|
|
36
36
|
configs: {
|
|
37
37
|
recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
|
|
@@ -41,17 +41,17 @@ declare module 'eslint-plugin-promise' {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
declare module 'eslint-plugin-react' {
|
|
44
|
-
import {
|
|
44
|
+
import type { ESLint } from 'eslint';
|
|
45
45
|
export default {} as ESLint.Plugin;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
declare module 'eslint-plugin-react-native' {
|
|
49
|
-
import {
|
|
49
|
+
import type { ESLint } from 'eslint';
|
|
50
50
|
export default {} as ESLint.Plugin;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
declare module 'eslint-plugin-security' {
|
|
54
|
-
import {
|
|
54
|
+
import type { ESLint } from 'eslint';
|
|
55
55
|
export default {} as {
|
|
56
56
|
configs: {
|
|
57
57
|
recommended: WithRequired<ESLint.ConfigData, 'plugins' | 'rules'>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a minimal linter scoped to a specific set of configs.
|
|
3
|
+
*
|
|
4
|
+
* @param {import('eslint').Linter.Config[]} configs
|
|
5
|
+
*/
|
|
6
|
+
export function createLinter(configs: import("eslint").Linter.Config[]): {
|
|
7
|
+
/**
|
|
8
|
+
* Returns the auto-fixed output for the given code.
|
|
9
|
+
*
|
|
10
|
+
* @param {string} code
|
|
11
|
+
* @param {string} [filename]
|
|
12
|
+
*/
|
|
13
|
+
fix(code: string, filename?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the lint messages for the given code without applying fixes.
|
|
16
|
+
*
|
|
17
|
+
* @param {string} code
|
|
18
|
+
* @param {string} [filename]
|
|
19
|
+
*/
|
|
20
|
+
verify(code: string, filename?: string): import(".store/@eslint-core-npm-0.17.0-8579df04c4/package", { with: { "resolution-mode": "require" } }).LintMessage[];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Builds the full config from the given URL, then disables projectService and
|
|
24
|
+
* all type-aware TypeScript rules so the linter can process code strings
|
|
25
|
+
* without needing real files on disk.
|
|
26
|
+
*
|
|
27
|
+
* @param {string | URL} url - Pass `import.meta.url` from the test file.
|
|
28
|
+
* @returns {Promise<ReturnType<typeof createLinter>>}
|
|
29
|
+
*/
|
|
30
|
+
export function createTestLinter(url: string | URL): Promise<ReturnType<typeof createLinter>>;
|