@santi020k/eslint-config-basic 1.3.0 → 1.4.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,94 @@
1
1
  # @santi020k/eslint-config-basic
2
2
 
3
+ ## 1.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#80](https://github.com/santi020k/eslint-config-basic/pull/80) [`7bccef0`](https://github.com/santi020k/eslint-config-basic/commit/7bccef0876e4ffde0c7395b5b20917225a067592) Thanks [@santi020k](https://github.com/santi020k)! - # v1.4.0 — API improvements, new optional, and quality-of-life fixes
8
+
9
+ ## Breaking changes
10
+
11
+ **Unified Node.js requirement to >=24.0.0.**
12
+ All packages in the monorepo now strictly require Node.js 24.0.0 or higher. This ensures compatibility with modern dependency versions (such as `cspell` v10) and aligns with the project's long-term maintenance strategy.
13
+
14
+ **`detectProjectOptions()` no longer sets boolean flags on `frameworks`.**
15
+ Previously, auto-detection would set `frameworks.react = true`, `frameworks.next = true`, etc. Passing those values to `eslintConfig()` would throw a `TypeError` because framework configs must be real imports, not booleans.
16
+
17
+ Detected frameworks are now reported via a new `detectedFrameworks: DetectedFrameworkName[]` field. The `frameworks` object in the detection result stays empty, so spreading `detectProjectOptions()` into `eslintConfig()` is always safe.
18
+
19
+ ```ts
20
+ // Before (would throw)
21
+ const opts = detectProjectOptions();
22
+
23
+ eslintConfig(opts); // ❌
24
+
25
+ // opts.frameworks.next === true → TypeError inside eslintConfig()
26
+
27
+ // After (safe)
28
+ const opts = detectProjectOptions();
29
+
30
+ // opts.detectedFrameworks → ['next', 'react'] (informational)
31
+ // opts.frameworks → {} (safe to spread)
32
+ eslintConfig(opts); // ✅
33
+ ```
34
+
35
+ ## New features
36
+
37
+ **`Extension.BestPractices` optional config** — adds four quality rules with no extra dependencies:
38
+ - `no-console` (warn) — catches leftover debug output
39
+ - `no-alert` (error) — disallows browser `alert` / `confirm` / `prompt`
40
+ - `complexity` (warn, max 10) — flags overly complex functions
41
+ - `max-depth` (warn, max 4) — flags deeply nested blocks
42
+
43
+ ```ts
44
+ eslintConfig({ extensions: [Extension.BestPractices] });
45
+ ```
46
+
47
+ **Category barrel exports for `@santi020k/eslint-config-optionals`** — five new sub-path exports let you import a whole category at once:
48
+
49
+ ```ts
50
+ // also: /extensions /tools /libraries
51
+ ```
52
+
53
+ **`NextMode` auto-detection** — `detectProjectOptions()` now detects App Router vs Pages Router by checking for an `app/` or `src/app/` directory, so `options.nextMode` is set automatically.
54
+
55
+ **`DetectedFrameworkName` type** — new exported union type listing all framework names that `detectProjectOptions()` can detect. Useful for display logic or tooling built on top of detection.
56
+
57
+ ## Improvements
58
+
59
+ **Early `tsconfigRootDir` validation** — `createTypescriptConfig()` now throws a clear, actionable error at config-creation time if the provided `tsconfigRootDir` path does not exist on disk, instead of failing silently at ESLint runtime.
60
+
61
+ **CI node version matrix** — the build pipeline now runs against Node 24.x to ensure stability across the updated engine requirements.
62
+
63
+ **`docs/PHILOSOPHY.md`** — new document explaining the major design decisions: why hard deps, flat config only, lazy framework loading, rule severity philosophy, and how to extend or override rules.
64
+
65
+ **Changelog synchronization** — new `sync-docs-changelog.mjs` script to automatically propagate root changelog updates to the documentation site.
66
+
67
+ ## Bug Fixes
68
+ - **CLI Scaffolding**: Resolved bug where auto-detected frameworks were not correctly included in the generated configuration.
69
+ - **Rule Set Update**: Updated React and Expo collections to reflect rule removals in `eslint-plugin-react-hooks@7` recommended configuration.
70
+ - **Tailwind CSS Performance**: Fixed `Atomics.wait()` timeout errors in monorepos by providing customizable settings in the recommended Tailwind configuration.
71
+
72
+ ## Dependency Updates
73
+ - **External Plugins**:
74
+ - Updated `@cspell/eslint-plugin` to `v10.0.0` (Major).
75
+ - Updated `typescript-eslint` to `v8.59.0`.
76
+ - Updated `eslint-plugin-react-hooks` to `v7.1.1`.
77
+ - Updated `eslint-plugin-perfectionist` to `v5.9.0`.
78
+ - Updated `eslint-plugin-sonarjs` to `v4.0.3`.
79
+ - Updated `tailwindcss` to `v4.2.4`.
80
+ - **Core Tooling**:
81
+ - Updated `eslint` to `v10.2.1`.
82
+ - Updated `vitest` and `@vitest/coverage-v8` to `v4.1.5`.
83
+ - Internal alignment of `typescript` version to `v5.9.3`.
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [[`7bccef0`](https://github.com/santi020k/eslint-config-basic/commit/7bccef0876e4ffde0c7395b5b20917225a067592)]:
88
+ - @santi020k/eslint-config-core@1.4.0
89
+ - @santi020k/eslint-config-optionals@1.4.0
90
+ - @santi020k/eslint-config-typescript@1.4.0
91
+
3
92
  ## 1.3.0
4
93
 
5
94
  ### Minor Changes
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env node
2
1
  declare const handleInit: (cwd?: string) => void;
3
2
  declare const handleUpdate: (cwd?: string) => void;
4
3
 
package/dist/cli.js CHANGED
@@ -20,16 +20,16 @@ const resolveConfigPath = (cwd) => {
20
20
  ].map((filename) => join(cwd, filename)).find(existsSync);
21
21
  return existingConfigPath ?? join(cwd, getDefaultConfigFilename(cwd));
22
22
  };
23
- const getFrameworkKeys = (frameworks) => {
24
- const frameworkKeys = new Set(Object.keys(frameworks ?? {}));
23
+ const getFrameworkKeys = (detectedFrameworks) => {
24
+ const frameworkKeys = new Set(detectedFrameworks ?? []);
25
25
  if (frameworkKeys.has("next") || frameworkKeys.has("expo")) {
26
26
  frameworkKeys.add("react");
27
27
  }
28
- return [...frameworkKeys];
28
+ return [...frameworkKeys].sort();
29
29
  };
30
30
  const createConfigContent = (cwd) => {
31
31
  const options = detectProjectOptions(cwd);
32
- const frameworkKeys = getFrameworkKeys(options.frameworks);
32
+ const frameworkKeys = getFrameworkKeys(options.detectedFrameworks);
33
33
  const imports = ["import { eslintConfig } from '@santi020k/eslint-config-basic'"];
34
34
  frameworkKeys.forEach((key) => {
35
35
  imports.push(`import ${key} from '@santi020k/eslint-config-${key}'`);
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { EslintConfigOptions, FlatConfigArray } from '@santi020k/eslint-config-core';
2
- export { EslintConfigOptions, Extension, FlatConfigArray, Format, ImportedFramework, Library, NextMode, Preset, ReactConfigKeys, Runtime, Setting, Testing, Tool, coreConfig, createCoreConfig, detectProjectOptions, getGlobalsForRuntime, gitignore, hasReactConfig, jsConfig } from '@santi020k/eslint-config-core';
2
+ export { DetectedFrameworkName, EslintConfigOptions, Extension, FlatConfigArray, Format, ImportedFramework, Library, NextMode, Preset, ReactConfigKeys, Runtime, Setting, Testing, Tool, coreConfig, createCoreConfig, detectProjectOptions, getGlobalsForRuntime, gitignore, hasReactConfig, jsConfig } from '@santi020k/eslint-config-core';
3
3
  export { tsConfig, typescriptConfig } from '@santi020k/eslint-config-typescript';
4
- export { cspell, cypress, graphql, i18next, jest, jsdoc, jsonc, markdown, mdx, perfectionist, playwright, prettier, regexp, security, sonarjs, stencil, storybook, swagger, tailwind, tanstackQuery, tanstackRouter, testingLibrary, toml, unicorn, vitest, yaml } from '@santi020k/eslint-config-optionals';
4
+ export { bestPractices, cspell, cypress, graphql, i18next, jest, jsdoc, jsonc, markdown, mdx, perfectionist, playwright, prettier, regexp, security, sonarjs, stencil, storybook, swagger, tailwind, tanstackQuery, tanstackRouter, testingLibrary, toml, unicorn, vitest, yaml } from '@santi020k/eslint-config-optionals';
5
5
 
6
6
  /**
7
7
  * Generates the ESLint configuration array, applying configurations
package/dist/index.js CHANGED
@@ -32,6 +32,7 @@ import {
32
32
  } from "@santi020k/eslint-config-core";
33
33
  import { tsConfig, typescriptConfig } from "@santi020k/eslint-config-typescript";
34
34
  import {
35
+ bestPractices,
35
36
  cspell,
36
37
  cypress,
37
38
  graphql,
@@ -173,6 +174,7 @@ export {
173
174
  Setting2 as Setting,
174
175
  Testing,
175
176
  Tool,
177
+ bestPractices,
176
178
  coreConfig2 as coreConfig,
177
179
  createCoreConfig2 as createCoreConfig,
178
180
  cspell,
package/dist/optionals.js CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  Tool
7
7
  } from "@santi020k/eslint-config-core";
8
8
  import {
9
+ bestPractices,
9
10
  cspell,
10
11
  cypress,
11
12
  graphql,
@@ -53,6 +54,7 @@ const getOptionalConfigs = (libraries, tools, testing, formats, extensions) => {
53
54
  if (formats.includes(Format.Yaml)) configs.push(...yaml);
54
55
  if (formats.includes(Format.Toml)) configs.push(...toml);
55
56
  if (formats.includes(Format.Graphql)) configs.push(...graphql);
57
+ if (extensions.includes(Extension.BestPractices)) configs.push(...bestPractices);
56
58
  if (extensions.includes(Extension.Regexp)) configs.push(...regexp);
57
59
  if (extensions.includes(Extension.Unicorn)) configs.push(...unicorn);
58
60
  if (extensions.includes(Extension.Sonarjs)) configs.push(...sonarjs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@santi020k/eslint-config-basic",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "A composable ESLint 9/10+ Flat Config package for JavaScript, TypeScript, React, Next.js, Vue, Svelte, Solid, Angular, Astro, Expo, NestJS, Qwik, and Remix.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -21,24 +21,24 @@
21
21
  "basic-eslint": "./dist/cli.js"
22
22
  },
23
23
  "dependencies": {
24
- "@typescript-eslint/utils": "^8.58.2",
25
- "eslint": "^10.2.0",
26
- "@santi020k/eslint-config-core": "^1.3.0",
27
- "@santi020k/eslint-config-optionals": "^1.3.0",
28
- "@santi020k/eslint-config-typescript": "^1.3.0"
24
+ "@typescript-eslint/utils": "^8.59.0",
25
+ "eslint": "^10.2.1",
26
+ "@santi020k/eslint-config-core": "^1.4.0",
27
+ "@santi020k/eslint-config-optionals": "^1.4.0",
28
+ "@santi020k/eslint-config-typescript": "^1.4.0"
29
29
  },
30
30
  "peerDependencies": {
31
- "@santi020k/eslint-config-angular": "^1.3.0",
32
- "@santi020k/eslint-config-astro": "^1.3.0",
33
- "@santi020k/eslint-config-expo": "^1.3.0",
34
- "@santi020k/eslint-config-nest": "^1.3.0",
35
- "@santi020k/eslint-config-next": "^1.3.0",
36
- "@santi020k/eslint-config-qwik": "^1.3.0",
37
- "@santi020k/eslint-config-react": "^1.3.0",
38
- "@santi020k/eslint-config-remix": "^1.3.0",
39
- "@santi020k/eslint-config-solid": "^1.3.0",
40
- "@santi020k/eslint-config-svelte": "^1.3.0",
41
- "@santi020k/eslint-config-vue": "^1.3.0"
31
+ "@santi020k/eslint-config-angular": "^1.4.0",
32
+ "@santi020k/eslint-config-astro": "^1.4.0",
33
+ "@santi020k/eslint-config-expo": "^1.4.0",
34
+ "@santi020k/eslint-config-nest": "^1.4.0",
35
+ "@santi020k/eslint-config-next": "^1.4.0",
36
+ "@santi020k/eslint-config-qwik": "^1.4.0",
37
+ "@santi020k/eslint-config-react": "^1.4.0",
38
+ "@santi020k/eslint-config-remix": "^1.4.0",
39
+ "@santi020k/eslint-config-solid": "^1.4.0",
40
+ "@santi020k/eslint-config-svelte": "^1.4.0",
41
+ "@santi020k/eslint-config-vue": "^1.4.0"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "@santi020k/eslint-config-angular": {
@@ -84,7 +84,7 @@
84
84
  "access": "public"
85
85
  },
86
86
  "engines": {
87
- "node": ">=22.12.0"
87
+ "node": ">=24.0.0"
88
88
  },
89
89
  "license": "MIT",
90
90
  "author": "santi020k",