@santi020k/eslint-config-basic 1.2.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,121 @@
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
+
92
+ ## 1.3.0
93
+
94
+ ### Minor Changes
95
+
96
+ - [#77](https://github.com/santi020k/eslint-config-basic/pull/77) [`450fa19`](https://github.com/santi020k/eslint-config-basic/commit/450fa1996aa651671513a32bd5d8736e5336be73) Thanks [@santi020k](https://github.com/santi020k)! - Refresh package metadata and supporting docs for the `santi020k.com` domain migration.
97
+ - Update documentation, canonical URLs, and package links from `santi020k.me` to `santi020k.com`.
98
+ - Sync npm package metadata so published packages point to the correct license, repository, issues page, and documentation URLs.
99
+ - Refresh low-risk ESLint ecosystem and release tooling dependencies.
100
+
101
+ ### Patch Changes
102
+
103
+ - Updated dependencies [[`450fa19`](https://github.com/santi020k/eslint-config-basic/commit/450fa1996aa651671513a32bd5d8736e5336be73)]:
104
+ - @santi020k/eslint-config-angular@1.3.0
105
+ - @santi020k/eslint-config-astro@1.3.0
106
+ - @santi020k/eslint-config-core@1.3.0
107
+ - @santi020k/eslint-config-expo@1.3.0
108
+ - @santi020k/eslint-config-nest@1.3.0
109
+ - @santi020k/eslint-config-next@1.3.0
110
+ - @santi020k/eslint-config-optionals@1.3.0
111
+ - @santi020k/eslint-config-qwik@1.3.0
112
+ - @santi020k/eslint-config-react@1.3.0
113
+ - @santi020k/eslint-config-remix@1.3.0
114
+ - @santi020k/eslint-config-solid@1.3.0
115
+ - @santi020k/eslint-config-svelte@1.3.0
116
+ - @santi020k/eslint-config-typescript@1.3.0
117
+ - @santi020k/eslint-config-vue@1.3.0
118
+
3
119
  ## 1.2.0
4
120
 
5
121
  ### Minor Changes
@@ -9,7 +125,6 @@
9
125
  This release focuses on a comprehensive update of the documentation site and branding refresh.
10
126
 
11
127
  ## Highlights
12
-
13
128
  - **VitePress Refresh**: Major updates to the documentation structure, including new guides and improved navigation.
14
129
  - **Branding Assets**: Added new official logos, icons, and social preview images (opengraph) in `packages/docs/public`.
15
130
  - **Theme Enhancements**: Custom styling and component improvements for a more premium documentation experience.
@@ -40,7 +155,6 @@
40
155
  - [#70](https://github.com/santi020k/eslint-config-basic/pull/70) [`ef658c1`](https://github.com/santi020k/eslint-config-basic/commit/ef658c170f6eaadce14a7e662eaa2a3762362e82) Thanks [@santi020k](https://github.com/santi020k)! - # 1.1.0 Release
41
156
 
42
157
  ## Update Highlights
43
-
44
158
  - **ESLint 10 Support**: Harmonized ESLint version to `^10.1.0` across the monorepo and playgrounds.
45
159
  - **Security Patches**: Fixed vulnerabilities in `lodash`, `esbuild`, and `path-to-regexp` via root overrides.
46
160
  - **Solid Playground Fix**: Resolved `MODULE_NOT_FOUND` error in the Solid playground linting process.
@@ -70,7 +184,6 @@
70
184
  - [#66](https://github.com/santi020k/eslint-config-basic/pull/66) [`6f2f473`](https://github.com/santi020k/eslint-config-basic/commit/6f2f4733642087eb9eac22a7b6193b71453f375d) Thanks [@santi020k](https://github.com/santi020k)! - v0.10.0 Release
71
185
 
72
186
  ## Major Changes
73
-
74
187
  - **Migration to pnpm**: Full migration of the monorepo from npm to pnpm workspaces (pnpm v10+). This includes better performance, stricter dependency management, and corepack integration.
75
188
  - **neostandard removal**: Removed `neostandard` dependency to provide more granular control and modularity in core rules.
76
189
  - **Stylistic v4 -> v5**: Upgraded to `@stylistic/eslint-plugin` version 5.x for improved formatting rules and TypeScript 5.7+ support.
@@ -78,14 +191,12 @@
78
191
  - **React 19 Support**: Updated React detection logic and configurations to support React 19.
79
192
 
80
193
  ## Framework Updates
81
-
82
194
  - **Qwik & Remix Support**: Added comprehensive ESLint configurations and functional playground environments for both Qwik and Remix frameworks.
83
195
  - **Dependency Alignment**: Resolved critical `typescript-eslint` dependency issues in Astro, Svelte, and Vue packages to ensure proper rule resolution and type safety.
84
196
  - **Consistency Refinements**: Standardized `disable-type-checked` rule blocks across all framework-specific configurations.
85
197
  - **Documentation Overhaul**: Major documentation refresh in root `README.md` and VitePress documentation. Added clarity on configuration priority, framework auto-detection, and full-settings examples.
86
198
 
87
199
  ## Maintenance
88
-
89
200
  - **Corepack Enablement**: Added `corepack` support for automated package manager version management.
90
201
  - **Turbo Update**: Bumped Turborepo to v2.9+ for faster builds and improved task caching.
91
202
  - **Turbo Optimizations**: Configured Turborepo to output in `errors-only` mode with `errorsOnlyShowHash` enabled, significantly reducing terminal noise during build and lint tasks.
@@ -95,7 +206,6 @@
95
206
  - [#55](https://github.com/santi020k/eslint-config-basic/pull/55) [`d8e4b4a`](https://github.com/santi020k/eslint-config-basic/commit/d8e4b4a61c2739dbffa3c823d8742ea234c5b731) Thanks [@santi020k](https://github.com/santi020k)! - feat: add standard ESLint configuration and resolve typecheck/hook failures
96
207
 
97
208
  This release introduces a new standard configuration in `@santi020k/eslint-config-core` and addresses several technical issues:
98
-
99
209
  - Fixed global typecheck failures across the monorepo.
100
210
  - Resolved pre-commit hook issues with cspell.
101
211
  - Fixed pre-push hook failures related to publint in the playground package.
@@ -133,7 +243,6 @@
133
243
  ### Patch Changes
134
244
 
135
245
  - CI & Workflow Stabilization
136
-
137
246
  - Fixed invalid `actions/setup-node` version from `@v6` to `@v4` in Release and Docs workflows.
138
247
  - Improved CLI test performance and reliability by refactoring integration tests into fast in-memory unit tests.
139
248
  - Enabled Turborepo caching in GitHub Actions to significantly reduce PR build times.
@@ -256,11 +365,9 @@
256
365
  ### Patch Changes
257
366
 
258
367
  - [#27](https://github.com/santi020k/eslint-config-basic/pull/27) [`577abbe`](https://github.com/santi020k/eslint-config-basic/commit/577abbe49c2a83f6ecc744413daf3d1e1e16be2c) Thanks [@santi020k](https://github.com/santi020k)! - ci: disable Husky git hooks during the release workflow
259
-
260
368
  - Added `HUSKY=0` environment variable to the release workflow to prevent Git hooks from interfering with the automated release process
261
369
 
262
370
  - [#25](https://github.com/santi020k/eslint-config-basic/pull/25) [`1fb4693`](https://github.com/santi020k/eslint-config-basic/commit/1fb4693b4ff6e3a1a9404096e14039121e1297b5) Thanks [@santi020k](https://github.com/santi020k)! - feat: add GitHub-linked changelogs and automatic GitHub releases with tags
263
-
264
371
  - Switched changelog generator to `@changesets/changelog-github` for richer changelogs with PR links, commit references, and contributor credits
265
372
  - Configured release workflow to create GitHub releases with git tags on publish
266
373
 
package/README.md CHANGED
@@ -9,9 +9,9 @@ Composable ESLint 10+ flat-config for JavaScript, TypeScript, and all major fram
9
9
 
10
10
  This is the main entry point of the [`@santi020k/eslint-config-basic`](https://github.com/santi020k/eslint-config-basic) monorepo.
11
11
 
12
- - Docs: [eslint.santi020k.me](https://eslint.santi020k.me/)
12
+ - Docs: [eslint.santi020k.com](https://eslint.santi020k.com/)
13
13
  - Repository: [santi020k/eslint-config-basic](https://github.com/santi020k/eslint-config-basic)
14
- - Author: [santi020k](https://santi020k.me)
14
+ - Author: [santi020k](https://santi020k.com)
15
15
 
16
16
  ## Quick start
17
17
 
@@ -26,4 +26,4 @@ import { eslintConfig } from '@santi020k/eslint-config-basic'
26
26
  export default eslintConfig()
27
27
  ```
28
28
 
29
- Auto-detects TypeScript, frameworks, and common tools from your `package.json`. See the [full docs](https://eslint.santi020k.me/) for all options.
29
+ Auto-detects TypeScript, frameworks, and common tools from your `package.json`. See the [full docs](https://eslint.santi020k.com/) for all options.
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,
@@ -127,7 +128,6 @@ const eslintConfig = (options) => {
127
128
  // React config (included if any React-based framework is used/passed)
128
129
  ...hasReact ? reactParam : [],
129
130
  ...nextParam,
130
- ...astroParam,
131
131
  ...expoParam,
132
132
  ...nestParam,
133
133
  ...vueParam,
@@ -137,6 +137,9 @@ const eslintConfig = (options) => {
137
137
  ...qwikParam,
138
138
  ...remixParam,
139
139
  ...typescript ? createTypescriptConfig({ tsconfigRootDir }) : [],
140
+ // Astro needs to run after generic TypeScript so its parser and false-positive
141
+ // workarounds win for .astro files and embedded expressions.
142
+ ...astroParam,
140
143
  // Next.js App Router overrides (#12)
141
144
  ...frameworks.next && nextMode === NextMode.AppRouter ? [
142
145
  {
@@ -171,6 +174,7 @@ export {
171
174
  Setting2 as Setting,
172
175
  Testing,
173
176
  Tool,
177
+ bestPractices,
174
178
  coreConfig2 as coreConfig,
175
179
  createCoreConfig2 as createCoreConfig,
176
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.2.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
- "eslint": "^9.0.0 || ^10.0.0",
25
- "@typescript-eslint/utils": "^8.57.0",
26
- "@santi020k/eslint-config-core": "^1.2.0",
27
- "@santi020k/eslint-config-optionals": "^1.2.0",
28
- "@santi020k/eslint-config-typescript": "^1.2.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.2.0",
32
- "@santi020k/eslint-config-astro": "^1.2.0",
33
- "@santi020k/eslint-config-expo": "^1.2.0",
34
- "@santi020k/eslint-config-nest": "^1.2.0",
35
- "@santi020k/eslint-config-next": "^1.2.0",
36
- "@santi020k/eslint-config-react": "^1.2.0",
37
- "@santi020k/eslint-config-solid": "^1.2.0",
38
- "@santi020k/eslint-config-svelte": "^1.2.0",
39
- "@santi020k/eslint-config-vue": "^1.2.0",
40
- "@santi020k/eslint-config-qwik": "^1.2.0",
41
- "@santi020k/eslint-config-remix": "^1.2.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",
@@ -93,6 +93,10 @@
93
93
  "url": "git+https://github.com/santi020k/eslint-config-basic.git",
94
94
  "directory": "packages/basic"
95
95
  },
96
+ "homepage": "https://eslint.santi020k.com/packages/basic.html",
97
+ "bugs": {
98
+ "url": "https://github.com/santi020k/eslint-config-basic/issues"
99
+ },
96
100
  "scripts": {
97
101
  "build": "tsup",
98
102
  "build:pack": "npm pack",