@lusc/eslint-config 16.0.0 → 18.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,3 +1,4 @@
1
1
  import comments from '@eslint-community/eslint-plugin-eslint-comments/configs';
2
+ import {defineConfig} from 'eslint/config';
2
3
 
3
- export default [comments.recommended];
4
+ export default defineConfig([comments.recommended]);
package/configs/eslint.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import js from '@eslint/js';
2
+ import {defineConfig} from 'eslint/config';
2
3
 
3
- export default [
4
+ export default defineConfig([
4
5
  js.configs.recommended,
5
6
  {
6
7
  rules: {
@@ -25,4 +26,4 @@ export default [
25
26
  eqeqeq: ['error', 'always'],
26
27
  },
27
28
  },
28
- ];
29
+ ]);
package/configs/import.js CHANGED
@@ -1,6 +1,7 @@
1
+ import {defineConfig} from 'eslint/config';
1
2
  import eslintPluginImportX from 'eslint-plugin-import-x';
2
3
 
3
- export default [
4
+ export default defineConfig([
4
5
  eslintPluginImportX.flatConfigs.recommended,
5
6
  eslintPluginImportX.flatConfigs.typescript,
6
7
  {
@@ -27,4 +28,4 @@ export default [
27
28
  'import-x/default': 'off',
28
29
  },
29
30
  },
30
- ];
31
+ ]);
package/configs/n.js CHANGED
@@ -1,6 +1,7 @@
1
+ import {defineConfig} from 'eslint/config';
1
2
  import nodePlugin from 'eslint-plugin-n';
2
3
 
3
- export default [
4
+ export default defineConfig([
4
5
  nodePlugin.configs['flat/recommended'],
5
6
  {
6
7
  rules: {
@@ -10,4 +11,4 @@ export default [
10
11
  'n/prefer-node-protocol': 'error',
11
12
  },
12
13
  },
13
- ];
14
+ ]);
@@ -0,0 +1,4 @@
1
+ import {defineConfig} from 'eslint/config';
2
+ import eslintNodeTest from 'eslint-node-test';
3
+
4
+ export default defineConfig([eslintNodeTest.configs.recommended]);
@@ -1,6 +1,7 @@
1
+ import {defineConfig} from 'eslint/config';
1
2
  import pluginPromise from 'eslint-plugin-promise';
2
3
 
3
- export default [
4
+ export default defineConfig([
4
5
  pluginPromise.configs['flat/recommended'],
5
6
  {
6
7
  rules: {
@@ -8,4 +9,4 @@ export default [
8
9
  'promise/always-return': 'off',
9
10
  },
10
11
  },
11
- ];
12
+ ]);
package/configs/regexp.js CHANGED
@@ -1,3 +1,4 @@
1
+ import {defineConfig} from 'eslint/config';
1
2
  import * as regexpPlugin from 'eslint-plugin-regexp';
2
3
 
3
- export default [regexpPlugin.configs.recommended];
4
+ export default defineConfig([regexpPlugin.configs.recommended]);
@@ -1,10 +1,11 @@
1
+ import {defineConfig} from 'eslint/config';
1
2
  import tsEslint from 'typescript-eslint';
2
3
 
3
4
  /**
4
5
  * @param {readonly string[]} globs
5
6
  */
6
7
  export default function typescript(globs) {
7
- return [
8
+ return defineConfig([
8
9
  ...tsEslint.configs.strictTypeChecked,
9
10
  {
10
11
  languageOptions: {
@@ -44,7 +45,7 @@ export default function typescript(globs) {
44
45
  ],
45
46
  },
46
47
  },
47
- ].map(config => ({
48
+ ]).map(config => ({
48
49
  ...config,
49
50
  files: ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts', ...globs],
50
51
  }));
@@ -1,6 +1,7 @@
1
+ import {defineConfig} from 'eslint/config';
1
2
  import eslintPluginUnicorn from 'eslint-plugin-unicorn';
2
3
 
3
- export default [
4
+ export default defineConfig([
4
5
  eslintPluginUnicorn.configs.recommended,
5
6
  {
6
7
  rules: {
@@ -17,4 +18,4 @@ export default [
17
18
  'unicorn/no-non-function-verb-prefix': 'off',
18
19
  },
19
20
  },
20
- ];
21
+ ]);
package/index.js CHANGED
@@ -1,11 +1,13 @@
1
1
  import * as tsParser from '@typescript-eslint/parser';
2
- import {globalIgnores} from 'eslint/config';
2
+ import {defineConfig, globalIgnores} from 'eslint/config';
3
3
  import globals from 'globals';
4
4
 
5
5
  import comments from './configs/comments.js';
6
6
  import eslint from './configs/eslint.js';
7
7
  import importConfig from './configs/import.js';
8
8
  import n from './configs/n.js';
9
+ // eslint-disable-next-line node-test/no-import-test-files
10
+ import nodeTest from './configs/node-test.js';
9
11
  import promise from './configs/promise.js';
10
12
  import regexp from './configs/regexp.js';
11
13
  import typescript from './configs/typescript.js';
@@ -21,7 +23,7 @@ const ignores = [
21
23
  ];
22
24
 
23
25
  export function withOptions({typescriptGlobs}) {
24
- return [
26
+ const options = defineConfig([
25
27
  globalIgnores(ignores, '@lusc/eslint-config global ignores'),
26
28
  {
27
29
  languageOptions: {
@@ -34,6 +36,10 @@ export function withOptions({typescriptGlobs}) {
34
36
  sourceType: 'module',
35
37
  },
36
38
  },
39
+ ]);
40
+
41
+ return [
42
+ ...options,
37
43
  eslint,
38
44
  comments,
39
45
  promise,
@@ -41,6 +47,7 @@ export function withOptions({typescriptGlobs}) {
41
47
  n,
42
48
  importConfig,
43
49
  regexp,
50
+ nodeTest,
44
51
  typescript(typescriptGlobs),
45
52
  ].flat();
46
53
  }
package/package.json CHANGED
@@ -6,16 +6,17 @@
6
6
  "dependencies": {
7
7
  "@eslint-community/eslint-plugin-eslint-comments": "^4.7.2",
8
8
  "@eslint/js": "^10.0.1",
9
- "@typescript-eslint/parser": "^8.62.1",
9
+ "@typescript-eslint/parser": "^8.64.0",
10
10
  "eslint-import-resolver-typescript": "^4.4.5",
11
+ "eslint-node-test": "^0.3.0",
11
12
  "eslint-plugin-import-x": "^4.17.1",
12
- "eslint-plugin-n": "^18.2.1",
13
+ "eslint-plugin-n": "^18.2.2",
13
14
  "eslint-plugin-promise": "^7.3.0",
14
15
  "eslint-plugin-regexp": "^3.1.1",
15
- "eslint-plugin-unicorn": "^70.0.0",
16
+ "eslint-plugin-unicorn": "^72.0.0",
16
17
  "globals": "^17.7.0",
17
18
  "typescript": "^6.0.3",
18
- "typescript-eslint": "^8.62.1"
19
+ "typescript-eslint": "^8.64.0"
19
20
  },
20
21
  "engines": {
21
22
  "node": "^24.10.0 || ^25.0.0 || ^26.0.0"
@@ -31,11 +32,11 @@
31
32
  "license": "MIT",
32
33
  "name": "@lusc/eslint-config",
33
34
  "peerDependencies": {
34
- "eslint": "^10.6.0"
35
+ "eslint": "^10.7.0"
35
36
  },
36
37
  "repository": {
37
38
  "url": "https://github.com/melusc/eslint-config"
38
39
  },
39
40
  "type": "module",
40
- "version": "16.0.0"
41
+ "version": "18.0.0"
41
42
  }