@egs33/eslint-config 4.1.1 → 4.1.3

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/base.js CHANGED
@@ -4,6 +4,7 @@ import array from 'eslint-plugin-array-func';
4
4
  import stylistic from '@stylistic/eslint-plugin';
5
5
  import eslintJs from '@eslint/js';
6
6
  import { configs as regexpConfig } from 'eslint-plugin-regexp';
7
+ import { defineConfig } from 'eslint/config';
7
8
  import { rules as PromiseRules } from './plugin-rules/promise.js';
8
9
  import { rules as StyleRules } from './plugin-rules/stylistic.js';
9
10
  import { bestPractices } from './airbnb/best-practices.js';
@@ -13,7 +14,7 @@ import { variables } from './airbnb/variables.js';
13
14
  import { es6 } from './airbnb/es6.js';
14
15
  import { imports } from './plugin-rules/imports.js';
15
16
 
16
- export default [
17
+ export default defineConfig([
17
18
  {
18
19
  languageOptions: {
19
20
  ecmaVersion: 2023,
@@ -22,11 +23,12 @@ export default [
22
23
  ecmaVersion: 2023,
23
24
  },
24
25
  },
25
- plugins: { import: importPlugin, promise },
26
+ plugins: { promise },
26
27
  linterOptions: {
27
28
  reportUnusedDisableDirectives: true,
28
29
  },
29
30
  settings: {
31
+ 'import/resolver': 'typescript', // Supports "exports" in package.json
30
32
  'import/parsers': {
31
33
  espree: ['.js', '.cjs', '.mjs', '.jsx'],
32
34
  },
@@ -46,6 +48,7 @@ export default [
46
48
  semi: true,
47
49
  }),
48
50
  eslintJs.configs.recommended,
51
+ importPlugin.flatConfigs.recommended,
49
52
  array.configs.all,
50
53
  regexpConfig['flat/recommended'],
51
54
  {
@@ -68,4 +71,4 @@ export default [
68
71
  ...StyleRules,
69
72
  },
70
73
  },
71
- ];
74
+ ]);
package/browser.js CHANGED
@@ -1,7 +1,8 @@
1
1
  import globals from 'globals';
2
+ import { defineConfig } from 'eslint/config';
2
3
  import base from './base.js';
3
4
 
4
- export default [
5
+ export default defineConfig([
5
6
  ...base,
6
7
  {
7
8
  languageOptions: {
@@ -10,4 +11,4 @@ export default [
10
11
  },
11
12
  },
12
13
  },
13
- ];
14
+ ]);
package/nodejs.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import node from 'eslint-plugin-n/configs/recommended-module.js';
2
2
  import globals from 'globals';
3
+ import { defineConfig } from 'eslint/config';
3
4
  import base from './base.js';
4
5
 
5
- export default [
6
+ export default defineConfig([
6
7
  ...base,
7
8
  node,
8
9
  {
@@ -20,4 +21,4 @@ export default [
20
21
  'import/extensions': ['error', 'always', { ignorePackages: true }],
21
22
  },
22
23
  },
23
- ];
24
+ ]);
package/package.json CHANGED
@@ -1,26 +1,27 @@
1
1
  {
2
2
  "name": "@egs33/eslint-config",
3
3
  "description": "eslint config for me",
4
- "version": "4.1.1",
4
+ "version": "4.1.3",
5
5
  "author": "egs33",
6
6
  "type": "module",
7
7
  "dependencies": {
8
- "@eslint/js": "^9.23.0",
9
- "@stylistic/eslint-plugin": "^4.2.0",
10
- "@typescript-eslint/eslint-plugin": "^8.28.0",
11
- "@typescript-eslint/parser": "^8.28.0",
12
- "eslint-plugin-array-func": "^5.0.2",
8
+ "@eslint/js": "^9.39.2",
9
+ "@stylistic/eslint-plugin": "^5.6.1",
10
+ "@typescript-eslint/eslint-plugin": "^8.51.0",
11
+ "@typescript-eslint/parser": "^8.51.0",
12
+ "eslint-import-resolver-typescript": "^4.4.4",
13
+ "eslint-plugin-array-func": "^5.1.0",
13
14
  "eslint-plugin-import": "^2.31.0",
14
- "eslint-plugin-n": "^17.16.2",
15
+ "eslint-plugin-n": "^17.23.1",
15
16
  "eslint-plugin-promise": "^7.1.0",
16
17
  "eslint-plugin-regexp": "^2.6.0",
17
- "globals": "^16.0.0"
18
+ "globals": "^16.5.0"
18
19
  },
19
20
  "devDependencies": {
20
- "eslint": "^9.23.0",
21
- "svelte-eslint-parser": "^1.1.0",
22
- "typescript": "^5.8.2",
23
- "typescript-eslint": "^8.28.0"
21
+ "eslint": "^9.39.2",
22
+ "svelte-eslint-parser": "^1.4.1",
23
+ "typescript": "^5.9.3",
24
+ "typescript-eslint": "^8.51.0"
24
25
  },
25
26
  "engines": {
26
27
  "node": ">=20"
@@ -45,12 +46,16 @@
45
46
  "license": "MIT",
46
47
  "main": "nodejs.js",
47
48
  "peerDependencies": {
48
- "eslint": "^9.13.0",
49
- "svelte-eslint-parser": ">=0.43.0",
49
+ "eslint": "^9.39.2",
50
+ "eslint-plugin-svelte": "^3.13.1",
51
+ "svelte-eslint-parser": "^1.4.1",
50
52
  "typescript": "^5.6.3",
51
- "typescript-eslint": "^8.12.2"
53
+ "typescript-eslint": "^8.51.0"
52
54
  },
53
55
  "peerDependenciesMeta": {
56
+ "eslint-plugin-svelte": {
57
+ "optional": true
58
+ },
54
59
  "typescript-eslint": {
55
60
  "optional": true
56
61
  },
@@ -7,7 +7,7 @@ export const rules = {
7
7
  '@stylistic/wrap-iife': ['error', 'outside', { functionPrototypeMethods: false }],
8
8
  '@stylistic/arrow-parens': ['error', 'always'],
9
9
  '@stylistic/function-call-argument-newline': ['error', 'consistent'],
10
- '@stylistic/func-call-spacing': ['error', 'never'],
10
+ '@stylistic/function-call-spacing': ['error', 'never'],
11
11
  '@stylistic/function-paren-newline': ['error', 'multiline-arguments'],
12
12
  '@stylistic/implicit-arrow-linebreak': ['error', 'beside'],
13
13
  '@stylistic/indent': [
@@ -132,5 +132,5 @@ export const rules = {
132
132
  '@stylistic/switch-colon-spacing': ['error', { after: true, before: false }],
133
133
  '@stylistic/wrap-regex': 'off',
134
134
  '@stylistic/array-bracket-newline': 'error',
135
- '@stylistic/no-extra-parens': ['error', 'all', { nestedBinaryExpressions: false, enforceForArrowConditionals: false }],
135
+ '@stylistic/no-extra-parens': ['error', 'all', { nestedBinaryExpressions: false, ignoredNodes: ['ArrowFunctionExpression[body.type=ConditionalExpression]'] }],
136
136
  };
@@ -1,15 +1,17 @@
1
- // eslint-disable-next-line import/no-unresolved
2
1
  import tseslint from 'typescript-eslint';
2
+ import importPlugin from 'eslint-plugin-import';
3
+ import { defineConfig } from 'eslint/config';
3
4
  import base from './base.js';
4
5
 
5
- const config = [
6
+ const config = defineConfig([
6
7
  ...base,
7
8
  ...tseslint.configs.strictTypeChecked,
8
9
  ...tseslint.configs.stylisticTypeChecked,
10
+ importPlugin.flatConfigs.typescript,
9
11
  {
10
12
  languageOptions: {
11
13
  parserOptions: {
12
- project: true,
14
+ projectService: true,
13
15
  },
14
16
  },
15
17
  rules: {
@@ -80,6 +82,6 @@ const config = [
80
82
  '@typescript-eslint/consistent-type-definitions': ['error', 'type'],
81
83
  },
82
84
  },
83
- ];
85
+ ]);
84
86
 
85
87
  export default config;
@@ -1,7 +1,8 @@
1
+ import { defineConfig } from 'eslint/config';
1
2
  import browser from './browser.js';
2
3
  import typescriptBase from './typescript-base.js';
3
4
 
4
- export default [
5
+ export default defineConfig([
5
6
  ...browser,
6
7
  ...typescriptBase,
7
- ];
8
+ ]);
@@ -1,7 +1,8 @@
1
+ import { defineConfig } from 'eslint/config';
1
2
  import nodejs from './nodejs.js';
2
3
  import typescriptBase from './typescript-base.js';
3
4
 
4
- export default [
5
+ export default defineConfig([
5
6
  ...nodejs,
6
7
  ...typescriptBase,
7
8
  {
@@ -9,4 +10,4 @@ export default [
9
10
  'n/no-missing-import': 'off',
10
11
  },
11
12
  },
12
- ];
13
+ ]);
@@ -1,26 +1,22 @@
1
1
  import svelteParser from 'svelte-eslint-parser';
2
- // eslint-disable-next-line import/no-unresolved
2
+
3
3
  import tseslint from 'typescript-eslint';
4
+ import svelte from 'eslint-plugin-svelte';
5
+ import { defineConfig } from 'eslint/config';
4
6
  import typescriptBrowser from './typescript-browser.js';
5
7
 
6
- export default [
8
+ export default defineConfig([
7
9
  ...typescriptBrowser,
10
+ ...svelte.configs.recommended,
8
11
  {
9
12
  languageOptions: {
10
13
  parser: svelteParser,
11
14
  parserOptions: {
12
15
  parser: tseslint.parser,
13
- project: './tsconfig.eslint.json',
16
+ projectService: true,
14
17
  extraFileExtensions: ['.svelte'],
15
18
  },
16
19
  },
17
- settings: {
18
- 'import/resolver': {
19
- typescript: {
20
- project: './tsconfig.eslint.json',
21
- },
22
- },
23
- },
24
20
  rules: {
25
21
  'import/no-mutable-exports': 'off',
26
22
  'import/no-named-as-default': 'off',
@@ -97,4 +93,4 @@ export default [
97
93
  'svelte/system': 'error',
98
94
  },
99
95
  },
100
- ];
96
+ ]);