@foray1010/eslint-config 16.0.1 → 17.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 CHANGED
@@ -3,6 +3,42 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [17.0.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@16.1.0...@foray1010/eslint-config@17.0.0) (2026-05-17)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ - drop node v20 and v25
11
+ - **deps:** require typescript `^6.0.3`
12
+ - **eslint-config:** require eslint `^10.3.0`
13
+
14
+ ### Features
15
+
16
+ - **eslint-config:** encourage to use named parameters
17
+ - **eslint-config:** require eslint `^10.3.0`
18
+ - **eslint-config:** update eslint-plugin-unicorn to v64 (major)
19
+ - support es2024
20
+
21
+ ### Bug Fixes
22
+
23
+ - **eslint-config:** update eslint-plugin-compat to v7 (major)
24
+ - **eslint-config:** update eslint-plugin-n to v18 (major)
25
+ - **eslint-config:** update eslint-plugin-simple-import-sort to v13 (major)
26
+
27
+ ### Miscellaneous Chores
28
+
29
+ - **deps:** require typescript `^6.0.3`
30
+ - drop node v20 and v25
31
+
32
+ ## [16.1.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@16.0.1...@foray1010/eslint-config@16.1.0) (2026-01-24)
33
+
34
+ ### Features
35
+
36
+ - **deps:** update globals to v17 ([d0b3bd9](https://github.com/foray1010/common-presets/commit/d0b3bd9707098a9e7a95bd0e9e250f417fe33494))
37
+
38
+ ### Bug Fixes
39
+
40
+ - **deps:** update eslint-plugin-regexp to v3 ([b4e82bb](https://github.com/foray1010/common-presets/commit/b4e82bb23fa2280dbf8c95e92b0d86ee9d420b8a))
41
+
6
42
  ## [16.0.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@16.0.0...@foray1010/eslint-config@16.0.1) (2025-10-31)
7
43
 
8
44
  ### Bug Fixes
package/README.md CHANGED
@@ -21,86 +21,85 @@ Z for looser rules
21
21
  1. `yarn add -DE @foray1010/eslint-config eslint prettier`
22
22
 
23
23
  2. Create an `eslint.config.js` in the project root
24
-
25
- - For general purpose or Node.js project (support TypeScript)
26
-
27
- ```js
28
- import {
29
- eslintIgnoresConfig,
30
- eslintNodeConfig,
31
- } from '@foray1010/eslint-config'
32
- import { defineConfig } from 'eslint/config'
33
-
34
- const config = defineConfig(eslintIgnoresConfig, eslintNodeConfig)
35
- export default config
36
- ```
37
-
38
- - For general frontend projects (support TypeScript)
39
-
40
- ```js
41
- import {
42
- eslintIgnoresConfig,
43
- eslintBrowserConfig,
44
- } from '@foray1010/eslint-config'
45
- import { defineConfig } from 'eslint/config'
46
-
47
- const config = defineConfig(eslintIgnoresConfig, eslintBrowserConfig)
48
- export default config
49
- ```
50
-
51
- - For frontend React projects (support TypeScript)
52
-
53
- ```js
54
- import {
55
- eslintIgnoresConfig,
56
- eslintReactConfig,
57
- } from '@foray1010/eslint-config'
58
- import { defineConfig } from 'eslint/config'
59
-
60
- const config = defineConfig(eslintIgnoresConfig, eslintReactConfig)
61
- export default config
62
- ```
63
-
64
- - You can apply config per different directories
65
-
66
- ```js
67
- import {
68
- eslintIgnoresConfig,
69
- eslintNodeConfig,
70
- eslintReactConfig,
71
- } from '@foray1010/eslint-config'
72
- import { defineConfig } from 'eslint/config'
73
-
74
- const config = defineConfig(
75
- eslintIgnoresConfig,
76
- {
77
- ignores: ['src/**'],
78
- extends: [eslintNodeConfig],
79
- },
80
- {
81
- files: ['src/**'],
82
- extends: [eslintReactConfig],
83
- },
84
- )
85
- export default config
86
- ```
24
+ - For general purpose or Node.js project (support TypeScript)
25
+
26
+ ```js
27
+ import {
28
+ eslintIgnoresConfig,
29
+ eslintNodeConfig,
30
+ } from '@foray1010/eslint-config'
31
+ import { defineConfig } from 'eslint/config'
32
+
33
+ const config = defineConfig(eslintIgnoresConfig, eslintNodeConfig)
34
+ export default config
35
+ ```
36
+
37
+ - For general frontend projects (support TypeScript)
38
+
39
+ ```js
40
+ import {
41
+ eslintIgnoresConfig,
42
+ eslintBrowserConfig,
43
+ } from '@foray1010/eslint-config'
44
+ import { defineConfig } from 'eslint/config'
45
+
46
+ const config = defineConfig(eslintIgnoresConfig, eslintBrowserConfig)
47
+ export default config
48
+ ```
49
+
50
+ - For frontend React projects (support TypeScript)
51
+
52
+ ```js
53
+ import {
54
+ eslintIgnoresConfig,
55
+ eslintReactConfig,
56
+ } from '@foray1010/eslint-config'
57
+ import { defineConfig } from 'eslint/config'
58
+
59
+ const config = defineConfig(eslintIgnoresConfig, eslintReactConfig)
60
+ export default config
61
+ ```
62
+
63
+ - You can apply config per different directories
64
+
65
+ ```js
66
+ import {
67
+ eslintIgnoresConfig,
68
+ eslintNodeConfig,
69
+ eslintReactConfig,
70
+ } from '@foray1010/eslint-config'
71
+ import { defineConfig } from 'eslint/config'
72
+
73
+ const config = defineConfig(
74
+ eslintIgnoresConfig,
75
+ {
76
+ ignores: ['src/**'],
77
+ extends: [eslintNodeConfig],
78
+ },
79
+ {
80
+ files: ['src/**'],
81
+ extends: [eslintReactConfig],
82
+ },
83
+ )
84
+ export default config
85
+ ```
87
86
 
88
87
  3. If the project support ES Modules, you can directly use `eslint` command with the following setting in `package.json`.
89
88
 
90
- ```json
91
- {
92
- "type": "module"
93
- }
94
- ```
89
+ ```json
90
+ {
91
+ "type": "module"
92
+ }
93
+ ```
95
94
 
96
95
  4. If the project does not support ES Modules, you have to put the config in `eslint.config.mjs` instead, and use the following npm script in `package.json`. Note that your editor may not support custom eslint config path and may not work properly.
97
96
 
98
- ```json
99
- {
100
- "scripts": {
101
- "eslint": "ESLINT_USE_FLAT_CONFIG=true eslint --config eslint.config.mjs"
102
- }
103
- }
104
- ```
97
+ ```json
98
+ {
99
+ "scripts": {
100
+ "eslint": "ESLINT_USE_FLAT_CONFIG=true eslint --config eslint.config.mjs"
101
+ }
102
+ }
103
+ ```
105
104
 
106
- then use `npm run eslint` or `yarn eslint` to replace `eslint`
105
+ then use `npm run eslint` or `yarn eslint` to replace `eslint`
package/bases/base.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /* eslint-disable import-x/extensions */
2
2
  import js from '@eslint/js'
3
- // @ts-expect-error - no official types
4
3
  import eslintPluginEslintCommentsConfigs from '@eslint-community/eslint-plugin-eslint-comments/configs'
5
4
  import { hasDep, isESM } from '@foray1010/common-presets-utils'
5
+ import eslintPluginFoxglove from '@foxglove/eslint-plugin'
6
6
  import { defineConfig } from 'eslint/config'
7
7
  import eslintPluginImportX from 'eslint-plugin-import-x'
8
8
  import eslintPluginJest from 'eslint-plugin-jest'
@@ -32,6 +32,9 @@ async function generateTypeScriptConfig() {
32
32
  eslintPluginImportX.configs['typescript'],
33
33
  esmConfig,
34
34
  ],
35
+ plugins: {
36
+ '@foxglove': eslintPluginFoxglove,
37
+ },
35
38
  languageOptions: {
36
39
  parserOptions: {
37
40
  // faster linting on cli
@@ -42,6 +45,8 @@ async function generateTypeScriptConfig() {
42
45
  },
43
46
  },
44
47
  rules: {
48
+ // promote named parameters by disallowing boolean parameters (boolean trap)
49
+ '@foxglove/no-boolean-parameters': 'error',
45
50
  // separate type exports which allow certain optimizations within compilers
46
51
  '@typescript-eslint/consistent-type-exports': [
47
52
  'error',
@@ -261,7 +266,7 @@ const baseConfig = defineConfig(
261
266
  },
262
267
  },
263
268
  {
264
- extends: [eslintPluginRegexp.configs['flat/recommended']],
269
+ extends: [eslintPluginRegexp.configs.recommended],
265
270
  rules: {
266
271
  // enable regexp strict mode (use `v` flag instead when it is widely supported)
267
272
  'regexp/require-unicode-regexp': 'error',
@@ -306,9 +311,9 @@ const baseConfig = defineConfig(
306
311
  reportUnusedInlineConfigs: 'error',
307
312
  },
308
313
  languageOptions: {
309
- ecmaVersion: 2023,
314
+ ecmaVersion: 2024,
310
315
  globals: {
311
- ...globals.es2023,
316
+ ...globals.es2024,
312
317
  /* Not using `node` to explicitly import node.js only built-in modules, e.g.
313
318
  * import { Buffer } from 'node:buffer'
314
319
  * import process from 'node:process'
@@ -319,6 +324,8 @@ const baseConfig = defineConfig(
319
324
  rules: {
320
325
  // always use named function for easier to debug via stack trace
321
326
  'func-names': ['error', 'as-needed'],
327
+ // promote named parameters by limiting function parameters
328
+ 'max-params': ['error', { max: 3, countThis: 'never' }],
322
329
  // prefer explicitly convert type for readability
323
330
  'no-implicit-coercion': 'error',
324
331
  // make sure private class members are in-use
package/constants.mjs CHANGED
@@ -1,4 +1,3 @@
1
- export const supportedFilesGlob = '**/*.{cjs,cts,js,mjs,mts,ts,tsx}'
2
1
  export const testFileGlobs = [
3
2
  '**/__fixtures__/**/*.{cjs,cts,js,mjs,mts,ts,tsx}',
4
3
  '**/__mocks__/**/*.{cjs,cts,js,mjs,mts,ts,tsx}',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@foray1010/eslint-config",
4
- "version": "16.0.1",
4
+ "version": "17.0.0",
5
5
  "homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
6
6
  "bugs": "https://github.com/foray1010/common-presets/issues",
7
7
  "repository": {
@@ -20,36 +20,37 @@
20
20
  "type:check": "tsc"
21
21
  },
22
22
  "dependencies": {
23
- "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
24
- "@eslint/js": "^9.38.0",
25
- "@foray1010/common-presets-utils": "^9.0.0",
23
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
24
+ "@eslint/js": "^10.0.1",
25
+ "@foray1010/common-presets-utils": "^10.0.0",
26
+ "@foxglove/eslint-plugin": "^2.1.2",
26
27
  "confusing-browser-globals": "^1.0.11",
27
28
  "eslint-config-prettier": "^10.1.8",
28
29
  "eslint-import-resolver-typescript": "^4.4.4",
29
- "eslint-plugin-compat": "^6.0.2",
30
- "eslint-plugin-import-x": "^4.16.1",
31
- "eslint-plugin-jest": "^29.0.1",
30
+ "eslint-plugin-compat": "^7.0.2",
31
+ "eslint-plugin-import-x": "^4.16.2",
32
+ "eslint-plugin-jest": "^29.15.2",
32
33
  "eslint-plugin-jest-dom": "^5.5.0",
33
34
  "eslint-plugin-jsx-a11y": "^6.10.2",
34
- "eslint-plugin-n": "^17.23.1",
35
- "eslint-plugin-prettier": "^5.5.4",
35
+ "eslint-plugin-n": "^18.0.1",
36
+ "eslint-plugin-prettier": "^5.5.5",
36
37
  "eslint-plugin-react": "^7.37.5",
37
- "eslint-plugin-react-hooks": "^7.0.1",
38
- "eslint-plugin-regexp": "^2.10.0",
39
- "eslint-plugin-simple-import-sort": "^12.1.1",
40
- "eslint-plugin-testing-library": "^7.13.3",
41
- "eslint-plugin-unicorn": "^62.0.0",
42
- "globals": "^16.4.0",
43
- "typescript-eslint": "^8.46.2"
38
+ "eslint-plugin-react-hooks": "^7.1.1",
39
+ "eslint-plugin-regexp": "^3.1.0",
40
+ "eslint-plugin-simple-import-sort": "^13.0.0",
41
+ "eslint-plugin-testing-library": "^7.16.2",
42
+ "eslint-plugin-unicorn": "^64.0.0",
43
+ "globals": "^17.6.0",
44
+ "typescript-eslint": "^8.59.2"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@types/confusing-browser-globals": "1.0.3"
47
48
  },
48
49
  "peerDependencies": {
49
50
  "@testing-library/dom": "^10.4.1",
50
- "eslint": "^9.38.0",
51
+ "eslint": "^10.3.0",
51
52
  "prettier": "^3.6.2",
52
- "typescript": "^5.9.3"
53
+ "typescript": "^6.0.3"
53
54
  },
54
55
  "peerDependenciesMeta": {
55
56
  "@testing-library/dom": {
@@ -60,10 +61,10 @@
60
61
  }
61
62
  },
62
63
  "engines": {
63
- "node": "^20.19.0 || ^22.12.0 || >=24.11.0"
64
+ "node": "^22.12.0 || ^24.11.0 || >=26"
64
65
  },
65
66
  "publishConfig": {
66
67
  "access": "public"
67
68
  },
68
- "gitHead": "307c2222f0e9ffc56f275a7a33496260d888643d"
69
+ "gitHead": "b0dcdf4522afb97a5ee7088c20299aad17738056"
69
70
  }
package/tsconfig.json CHANGED
@@ -3,6 +3,7 @@
3
3
  "extends": "@foray1010/tsconfig/tsconfig.base.json",
4
4
  "compilerOptions": {
5
5
  "allowJs": true,
6
- "checkJs": true
7
- }
6
+ "checkJs": true,
7
+ "types": ["node"],
8
+ },
8
9
  }