@santi020k/eslint-config-basic 1.3.0 → 1.5.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,109 @@
1
1
  # @santi020k/eslint-config-basic
2
2
 
3
+ ## 1.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#82](https://github.com/santi020k/eslint-config-basic/pull/82) [`af844f6`](https://github.com/santi020k/eslint-config-basic/commit/af844f663f8403d679467e0dd2a7251e8f3d4bcd) Thanks [@santi020k](https://github.com/santi020k)! - - Add first-class Hono support with Worker runtime globals, package detection, and a playground for Cloudflare Workers-style projects.
8
+ - Lower the Node.js engine requirement to `>=22.18.0` in `package.json` and `.nvmrc`, and validate CI against Node.js 22.
9
+ - Update `README.md` with a landing pointer to the canonical docs site.
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies [[`af844f6`](https://github.com/santi020k/eslint-config-basic/commit/af844f663f8403d679467e0dd2a7251e8f3d4bcd)]:
14
+ - @santi020k/eslint-config-core@1.5.0
15
+ - @santi020k/eslint-config-optionals@1.5.0
16
+ - @santi020k/eslint-config-typescript@1.5.0
17
+
18
+ ## 1.4.0
19
+
20
+ ### Minor Changes
21
+
22
+ - [#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
23
+
24
+ ## Breaking changes
25
+
26
+ **Unified Node.js requirement to >=24.0.0.**
27
+ 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.
28
+
29
+ **`detectProjectOptions()` no longer sets boolean flags on `frameworks`.**
30
+ 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.
31
+
32
+ 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.
33
+
34
+ ```ts
35
+ // Before (would throw)
36
+ const opts = detectProjectOptions();
37
+
38
+ eslintConfig(opts); // ❌
39
+
40
+ // opts.frameworks.next === true → TypeError inside eslintConfig()
41
+
42
+ // After (safe)
43
+ const opts = detectProjectOptions();
44
+
45
+ // opts.detectedFrameworks → ['next', 'react'] (informational)
46
+ // opts.frameworks → {} (safe to spread)
47
+ eslintConfig(opts); // ✅
48
+ ```
49
+
50
+ ## New features
51
+
52
+ **`Extension.BestPractices` optional config** — adds four quality rules with no extra dependencies:
53
+ - `no-console` (warn) — catches leftover debug output
54
+ - `no-alert` (error) — disallows browser `alert` / `confirm` / `prompt`
55
+ - `complexity` (warn, max 10) — flags overly complex functions
56
+ - `max-depth` (warn, max 4) — flags deeply nested blocks
57
+
58
+ ```ts
59
+ eslintConfig({ extensions: [Extension.BestPractices] });
60
+ ```
61
+
62
+ **Category barrel exports for `@santi020k/eslint-config-optionals`** — five new sub-path exports let you import a whole category at once:
63
+
64
+ ```ts
65
+ // also: /extensions /tools /libraries
66
+ ```
67
+
68
+ **`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.
69
+
70
+ **`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.
71
+
72
+ ## Improvements
73
+
74
+ **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.
75
+
76
+ **CI node version matrix** — the build pipeline now runs against Node 24.x to ensure stability across the updated engine requirements.
77
+
78
+ **`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.
79
+
80
+ **Changelog synchronization** — new `sync-docs-changelog.mjs` script to automatically propagate root changelog updates to the documentation site.
81
+
82
+ ## Bug Fixes
83
+ - **CLI Scaffolding**: Resolved bug where auto-detected frameworks were not correctly included in the generated configuration.
84
+ - **Rule Set Update**: Updated React and Expo collections to reflect rule removals in `eslint-plugin-react-hooks@7` recommended configuration.
85
+ - **Tailwind CSS Performance**: Fixed `Atomics.wait()` timeout errors in monorepos by providing customizable settings in the recommended Tailwind configuration.
86
+
87
+ ## Dependency Updates
88
+ - **External Plugins**:
89
+ - Updated `@cspell/eslint-plugin` to `v10.0.0` (Major).
90
+ - Updated `typescript-eslint` to `v8.59.0`.
91
+ - Updated `eslint-plugin-react-hooks` to `v7.1.1`.
92
+ - Updated `eslint-plugin-perfectionist` to `v5.9.0`.
93
+ - Updated `eslint-plugin-sonarjs` to `v4.0.3`.
94
+ - Updated `tailwindcss` to `v4.2.4`.
95
+ - **Core Tooling**:
96
+ - Updated `eslint` to `v10.2.1`.
97
+ - Updated `vitest` and `@vitest/coverage-v8` to `v4.1.5`.
98
+ - Internal alignment of `typescript` version to `v5.9.3`.
99
+
100
+ ### Patch Changes
101
+
102
+ - Updated dependencies [[`7bccef0`](https://github.com/santi020k/eslint-config-basic/commit/7bccef0876e4ffde0c7395b5b20917225a067592)]:
103
+ - @santi020k/eslint-config-core@1.4.0
104
+ - @santi020k/eslint-config-optionals@1.4.0
105
+ - @santi020k/eslint-config-typescript@1.4.0
106
+
3
107
  ## 1.3.0
4
108
 
5
109
  ### 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,
@@ -103,6 +104,7 @@ const eslintConfig = (options) => {
103
104
  });
104
105
  const expoParam = resolveFramework("expo", frameworks.expo);
105
106
  const nestParam = resolveFramework("nest", frameworks.nest);
107
+ const honoParam = resolveFramework("hono", frameworks.hono, { runtime });
106
108
  const vueParam = resolveFramework("vue", frameworks.vue);
107
109
  const svelteParam = resolveFramework("svelte", frameworks.svelte);
108
110
  const solidParam = resolveFramework("solid", frameworks.solid);
@@ -129,6 +131,7 @@ const eslintConfig = (options) => {
129
131
  ...nextParam,
130
132
  ...expoParam,
131
133
  ...nestParam,
134
+ ...honoParam,
132
135
  ...vueParam,
133
136
  ...svelteParam,
134
137
  ...solidParam,
@@ -173,6 +176,7 @@ export {
173
176
  Setting2 as Setting,
174
177
  Testing,
175
178
  Tool,
179
+ bestPractices,
176
180
  coreConfig2 as coreConfig,
177
181
  createCoreConfig2 as createCoreConfig,
178
182
  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/dist/resolvers.js CHANGED
@@ -39,6 +39,11 @@ const resolvePreset = (preset) => {
39
39
  typescript: true,
40
40
  runtime: Runtime.Browser
41
41
  };
42
+ case Preset.Worker:
43
+ return {
44
+ typescript: true,
45
+ runtime: Runtime.Worker
46
+ };
42
47
  case Preset.All:
43
48
  return {
44
49
  typescript: true,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@santi020k/eslint-config-basic",
3
- "version": "1.3.0",
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.",
3
+ "version": "1.5.0",
4
+ "description": "A composable ESLint 9/10+ Flat Config package for JavaScript, TypeScript, React, Next.js, Vue, Svelte, Solid, Angular, Astro, Expo, NestJS, Hono, Qwik, and Remix.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -21,24 +21,25 @@
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.5.0",
27
+ "@santi020k/eslint-config-optionals": "^1.5.0",
28
+ "@santi020k/eslint-config-typescript": "^1.5.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.5.0",
32
+ "@santi020k/eslint-config-astro": "^1.5.0",
33
+ "@santi020k/eslint-config-expo": "^1.5.0",
34
+ "@santi020k/eslint-config-hono": "^1.5.0",
35
+ "@santi020k/eslint-config-nest": "^1.5.0",
36
+ "@santi020k/eslint-config-next": "^1.5.0",
37
+ "@santi020k/eslint-config-qwik": "^1.5.0",
38
+ "@santi020k/eslint-config-react": "^1.5.0",
39
+ "@santi020k/eslint-config-remix": "^1.5.0",
40
+ "@santi020k/eslint-config-solid": "^1.5.0",
41
+ "@santi020k/eslint-config-svelte": "^1.5.0",
42
+ "@santi020k/eslint-config-vue": "^1.5.0"
42
43
  },
43
44
  "peerDependenciesMeta": {
44
45
  "@santi020k/eslint-config-angular": {
@@ -50,6 +51,9 @@
50
51
  "@santi020k/eslint-config-expo": {
51
52
  "optional": true
52
53
  },
54
+ "@santi020k/eslint-config-hono": {
55
+ "optional": true
56
+ },
53
57
  "@santi020k/eslint-config-nest": {
54
58
  "optional": true
55
59
  },
@@ -84,7 +88,7 @@
84
88
  "access": "public"
85
89
  },
86
90
  "engines": {
87
- "node": ">=22.12.0"
91
+ "node": ">=22.18.0"
88
92
  },
89
93
  "license": "MIT",
90
94
  "author": "santi020k",