@1stg/eslint-config 10.0.0 → 10.2.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.
Files changed (4) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/_util.js +7 -1
  3. package/base.js +11 -2
  4. package/package.json +23 -19
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Change Log
2
2
 
3
+ ## 10.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#381](https://github.com/1stG/configs/pull/381) [`4c2cbd7`](https://github.com/1stG/configs/commit/4c2cbd7ee4b5ef548d6ad9a265a1c42c68300e09) Thanks [@renovate](https://github.com/apps/renovate)! - chore(deps): update all upgradable plugins
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`a7ee3ee`](https://github.com/1stG/configs/commit/a7ee3ee619abbd070a2c9f5e29346af6fab1b3a8)]:
12
+ - @1stg/config@1.2.0
13
+
14
+ ## 10.1.0
15
+
16
+ ### Minor Changes
17
+
18
+ - [#377](https://github.com/1stG/configs/pull/377) [`ed8b7e5`](https://github.com/1stG/configs/commit/ed8b7e56fedf3c99b99b64631d675f67a7265825) Thanks [@JounQin](https://github.com/JounQin)! - feat: enable `eslint-plugin-node-dependencies` conditionally
19
+
20
+ ### Patch Changes
21
+
22
+ - [#377](https://github.com/1stG/configs/pull/377) [`ed8b7e5`](https://github.com/1stG/configs/commit/ed8b7e56fedf3c99b99b64631d675f67a7265825) Thanks [@JounQin](https://github.com/JounQin)! - fix: declare node engines range correctly
23
+
24
+ - Updated dependencies [[`ed8b7e5`](https://github.com/1stG/configs/commit/ed8b7e56fedf3c99b99b64631d675f67a7265825)]:
25
+ - @1stg/config@1.1.0
26
+
3
27
  ## 10.0.0
4
28
 
5
29
  ### Major Changes
package/_util.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import path from 'node:path'
4
4
 
5
- import { preferPrettier } from '@1stg/config'
5
+ import { isCI, isEnvDisabled, isEnvEnabled, preferPrettier } from '@1stg/config'
6
6
  import {
7
7
  isMonorepo,
8
8
  isPkgAvailable,
@@ -78,3 +78,9 @@ export const nonSourceRules = /** @type {const} */ ({
78
78
  'n/no-extraneous-require': 0,
79
79
  'n/no-unsupported-features/es-builtins': 0,
80
80
  })
81
+
82
+ const ESLINT_NODE_DEPS_ENV = 'ESLINT_NODE_DEPS'
83
+
84
+ export const isEslintNodeDepsEnabled = isCI
85
+ ? !isEnvDisabled(ESLINT_NODE_DEPS_ENV)
86
+ : isEnvEnabled(ESLINT_NODE_DEPS_ENV)
package/base.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  import eslint from '@eslint/js'
4
4
  import eslintCommentsConfigs from '@eslint-community/eslint-plugin-eslint-comments/configs'
5
+ import { isPkgAvailable, tryRequirePkg } from '@pkgr/utils'
5
6
  import { createTypeScriptImportResolver } from 'eslint-import-resolver-typescript'
6
7
  import css from 'eslint-plugin-css'
7
8
  import importX from 'eslint-plugin-import-x'
@@ -16,6 +17,7 @@ import globals from 'globals'
16
17
  import tseslint from 'typescript-eslint'
17
18
 
18
19
  import {
20
+ isEslintNodeDepsEnabled,
19
21
  isTsAvailable,
20
22
  isWebpackAvailable,
21
23
  magicNumbers,
@@ -34,6 +36,13 @@ export const base = tseslint.config([
34
36
  sonarjs.configs.recommended,
35
37
  unicornX.configs.recommended,
36
38
  prettierExtends,
39
+ isEslintNodeDepsEnabled && isPkgAvailable('eslint-plugin-node-dependencies')
40
+ ? [
41
+ /** @type {typeof import('eslint-plugin-node-dependencies')} */ (
42
+ tryRequirePkg('eslint-plugin-node-dependencies')
43
+ ).configs['flat/recommended'],
44
+ ]
45
+ : [],
37
46
  {
38
47
  name: '@1stg/node',
39
48
  files: ['**/*.{cjs,cts}'],
@@ -55,8 +64,8 @@ export const base = tseslint.config([
55
64
  'import-x/resolver-next': createTypeScriptImportResolver(),
56
65
  n: {
57
66
  convertPath: {
58
- '**/bin.ts': [String.raw`^(src/)?bin\.ts$`, 'lib/bin.js'],
59
- '**/cli.ts': [String.raw`^(src/)?cli\.ts$`, 'lib/cli.js'],
67
+ '**/bin.*ts': [String.raw`^(src/)?bin\.([cm]?)ts$`, 'lib/bin.$2js'],
68
+ '**/cli.*ts': [String.raw`^(src/)?cli\.([cm]?)ts$`, 'lib/cli.$2js'],
60
69
  },
61
70
  },
62
71
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1stg/eslint-config",
3
- "version": "10.0.0",
3
+ "version": "10.2.0",
4
4
  "type": "module",
5
5
  "description": "Personal but Shareable ESLint Configuration for all 1stG.me projects",
6
6
  "repository": "git+https://github.com/1stG/configs.git",
@@ -9,7 +9,7 @@
9
9
  "funding": "https://opencollective.com/configs",
10
10
  "license": "MIT",
11
11
  "engines": {
12
- "node": ">=18.18"
12
+ "node": "^18.20.0 || ^20.19.0 || >=22.12.0"
13
13
  },
14
14
  "main": "index.js",
15
15
  "exports": {
@@ -25,10 +25,11 @@
25
25
  "@babel/eslint-plugin": "^7.0.0",
26
26
  "@eslint-react/eslint-plugin": "^1.0.0",
27
27
  "@vitest/eslint-plugin": "^1.0.0",
28
- "angular-eslint": "^18.0.0 || ^19.0.0",
28
+ "angular-eslint": "^18.0.0 || ^19.0.0 || ^20.0.0",
29
29
  "angular-eslint-template-parser": "^0.1.0",
30
30
  "eslint": ">=8.0.0",
31
- "eslint-plugin-jest": "^28.0.0",
31
+ "eslint-plugin-jest": "^28.0.0 || ^29.0.0",
32
+ "eslint-plugin-node-dependencies": "^1.0.0",
32
33
  "eslint-plugin-react-hooks": "^5.0.0",
33
34
  "eslint-plugin-react-refresh": "^0.4.0",
34
35
  "eslint-plugin-vue": "^10.0.0"
@@ -55,6 +56,9 @@
55
56
  "eslint-plugin-jest": {
56
57
  "optional": true
57
58
  },
59
+ "eslint-plugin-node-dependencies": {
60
+ "optional": true
61
+ },
58
62
  "eslint-plugin-react-hooks": {
59
63
  "optional": true
60
64
  },
@@ -66,31 +70,31 @@
66
70
  }
67
71
  },
68
72
  "dependencies": {
69
- "@1stg/config": "^1.0.5",
73
+ "@1stg/config": "^1.2.0",
70
74
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
71
- "@eslint/js": "^9.27.0",
72
- "@pkgr/utils": "^3.1.2",
73
- "@typescript-eslint/eslint-plugin": "^8.32.1",
74
- "@typescript-eslint/parser": "^8.32.1",
75
+ "@eslint/js": "^9.29.0",
76
+ "@pkgr/utils": "^4.0.0",
77
+ "@typescript-eslint/eslint-plugin": "^8.35.0",
78
+ "@typescript-eslint/parser": "^8.35.0",
75
79
  "eslint-config-prettier": "^10.1.5",
76
- "eslint-import-resolver-typescript": "^4.3.5",
80
+ "eslint-import-resolver-typescript": "^4.4.3",
77
81
  "eslint-plugin-css": "^0.11.0",
78
- "eslint-plugin-import-x": "^4.12.2",
79
- "eslint-plugin-jsdoc": "^50.6.17",
82
+ "eslint-plugin-import-x": "^4.16.0",
83
+ "eslint-plugin-jsdoc": "^50.8.0 || ^51.2.3",
80
84
  "eslint-plugin-jsonc": "^2.20.1",
81
85
  "eslint-plugin-markup": "^1.0.1",
82
- "eslint-plugin-mdx": "^3.4.2",
83
- "eslint-plugin-n": "^17.18.0",
84
- "eslint-plugin-prettier": "^5.4.0",
86
+ "eslint-plugin-mdx": "^3.5.0",
87
+ "eslint-plugin-n": "^17.20.0",
88
+ "eslint-plugin-prettier": "^5.5.1",
85
89
  "eslint-plugin-promise": "^7.2.1",
86
- "eslint-plugin-regexp": "^2.7.0",
90
+ "eslint-plugin-regexp": "^2.9.0",
87
91
  "eslint-plugin-simple-import-sort": "^12.1.1",
88
92
  "eslint-plugin-sonarjs": "^3.0.2",
89
93
  "eslint-plugin-toml": "^0.12.0",
90
- "eslint-plugin-unicorn-x": "^1.0.7",
94
+ "eslint-plugin-unicorn-x": "^2.0.0",
91
95
  "eslint-plugin-yml": "^1.18.0",
92
- "globals": "^16.1.0",
93
- "typescript-eslint": "^8.32.1"
96
+ "globals": "^16.2.0",
97
+ "typescript-eslint": "^8.35.0"
94
98
  },
95
99
  "publishConfig": {
96
100
  "access": "public"