@darksheep/eslint 10.0.7 โ†’ 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 CHANGED
@@ -1,5 +1,34 @@
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
+
3
32
  ## [10.0.7](https://github.com/DarkSheepSoftware/eslint/compare/v10.0.6...v10.0.7) (2026-03-01)
4
33
 
5
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darksheep/eslint",
3
- "version": "10.0.7",
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.7.0",
29
- "@eslint/compat": "2.0.2",
30
- "@eslint/js": "9.39.3",
31
- "@stylistic/eslint-plugin": "5.9.0",
32
- "@typescript-eslint/eslint-plugin": "8.56.1",
33
- "@typescript-eslint/parser": "8.56.1",
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",
34
35
  "editorconfig": "3.0.2",
35
- "eslint-plugin-command": "3.4.0",
36
- "eslint-plugin-jest": "29.15.0",
37
- "eslint-plugin-jsdoc": "62.7.1",
38
- "eslint-plugin-jsonc": "3.1.1",
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.89.2",
41
- "eslint-plugin-perfectionist": "5.6.0",
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.0.0",
46
+ "eslint-plugin-regexp": "3.1.0",
46
47
  "eslint-plugin-security": "4.0.0",
47
- "eslint-plugin-unicorn": "63.0.0",
48
+ "eslint-plugin-unicorn": "64.0.0",
48
49
  "eslint-plugin-unused-imports": "4.4.1",
49
- "eslint-plugin-yml": "3.3.0",
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.4.0",
57
- "@types/node": "~24.11.0",
58
- "eslint": "~9.39.0",
59
- "typescript": "~5.9.0"
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.12.0",
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.14.0",
75
- "yarn": "4.12.0"
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',
@@ -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',
@@ -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: 1,
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
  ],
@@ -174,9 +174,11 @@ export async function createEslintTypescriptConfig(root) {
174
174
  name: 'typescript/ts',
175
175
  files: getTypescriptFiles(),
176
176
  rules: {
177
+ '@typescript-eslint/no-import-type-side-effects': [ 'error' ],
177
178
  '@typescript-eslint/consistent-type-exports': [ 'error', { fixMixedExportsWithInlineTypeSpecifier: true } ],
178
179
  '@typescript-eslint/consistent-type-imports': [ 'error', {
179
- fixStyle: 'inline-type-imports',
180
+ disallowTypeAnnotations: true,
181
+ fixStyle: 'separate-type-imports',
180
182
  prefer: 'type-imports',
181
183
  } ],
182
184
  '@typescript-eslint/use-unknown-in-catch-callback-variable': 'error',
@@ -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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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 { type ESLint } from 'eslint';
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>>;
@@ -0,0 +1,5 @@
1
+ export type LintTest = {
2
+ code: string;
3
+ messages?: Partial<Linter.LintMessage>[];
4
+ };
5
+ import type { Linter } from 'eslint';