From 9cd8011416071c6acafb8948229d3b609959abb4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 18:36:04 +0000 Subject: [PATCH 1/3] Initial plan From 926306f1a643720e557e4577fb704cedcb6586a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 18:41:03 +0000 Subject: [PATCH 2/3] feat(biome-config): split React-specific rules into separate react.json config Co-authored-by: tutods <18479474+tutods@users.noreply.github.com> --- configs/biome-config/README.md | 15 ++++++++------ configs/biome-config/base.json | 18 ----------------- configs/biome-config/nestjs.json | 3 --- configs/biome-config/package.json | 1 + configs/biome-config/react.json | 33 +++++++++++++++++++++++++++++++ configs/biome-config/solidjs.json | 3 --- 6 files changed, 43 insertions(+), 30 deletions(-) create mode 100644 configs/biome-config/react.json diff --git a/configs/biome-config/README.md b/configs/biome-config/README.md index 8a353576..afb46c55 100644 --- a/configs/biome-config/README.md +++ b/configs/biome-config/README.md @@ -26,11 +26,12 @@ This configuration package has the purpose of store my common configurations use ### 💡️ What you will find? -For now, you will found 4 configurations, being three of them based on the main one: +For now, you will found 5 configurations, being four of them based on the main one: -- **`base.json`**: stores the basic/global configuration with comprehensive linting rules for JavaScript/TypeScript projects; +- **`base.json`**: stores the basic/global configuration with comprehensive linting rules for JavaScript/TypeScript projects (framework-agnostic); +- **`react.json`**: extends base configuration with React-specific linting rules (hooks, fragments, etc.); - **`nestjs.jsonc`:** extends base configuration for **Nest.js** projects (allowing decorators, etc.); -- **`solidjs.json`:** extends base configuration for **SolidJS** projects, changing React-specific rules; +- **`solidjs.json`:** extends base configuration for **SolidJS** projects, with SolidJS-specific rules; - **`nextjs.json`:** extends base configuration for **Next.js** projects (App Router), disabling `noDefaultExport` rule for specific Next.js files that require default exports. ## ✨ Features @@ -94,9 +95,9 @@ To install my package and use it is very simple, you only need to follow the ste Below, you can find examples of usages: -- for a **React** project, using only the base configuration; +- for a **React** project, using the base configuration and React-specific rules; - for a **Nest.js** project, using the base configuration and the specific Nest.js configuration with specific rules; -- for a **Next.js** project, using the base configuration and the specific Next.js configuration with App Router rules. +- for a **Next.js** project, using the base configuration, React configuration, and the specific Next.js configuration with App Router rules. #### React project @@ -104,7 +105,8 @@ Below, you can find examples of usages: { "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "extends": [ - "@tutods/biome-config" + "@tutods/biome-config", + "@tutods/biome-config/react" ] } ``` @@ -128,6 +130,7 @@ Below, you can find examples of usages: "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", "extends": [ "@tutods/biome-config", + "@tutods/biome-config/react", "@tutods/biome-config/nextjs" ] } diff --git a/configs/biome-config/base.json b/configs/biome-config/base.json index ce8d4332..77eb9fd0 100644 --- a/configs/biome-config/base.json +++ b/configs/biome-config/base.json @@ -72,18 +72,12 @@ "complexity": { "recommended": true, "noForEach": "off", - "noUselessFragments": { - "level": "error", - "fix": "safe", - "options": {} - }, "noUselessStringConcat": "error", "noUselessTernary": "error", "noUselessEscapeInRegex": "error" }, "correctness": { "recommended": true, - "useHookAtTopLevel": "error", "noUnusedImports": { "fix": "safe", "level": "error", @@ -189,8 +183,6 @@ "useAwaitThenable": "error", "useRegexpExec": "warn", "noEqualsToNull": "error", - "noLeakedRender": "error", - "noDuplicatedSpreadProps": "error", "noAmbiguousAnchorText": "warn", "noMultiStr": "error" }, @@ -202,16 +194,6 @@ } }, "overrides": [ - { - "includes": ["**/*.jsx", "**/*.tsx"], - "linter": { - "rules": { - "style": { - "noImplicitBoolean": "off" - } - } - } - }, { "includes": [ "**/rsbuild.config.ts", diff --git a/configs/biome-config/nestjs.json b/configs/biome-config/nestjs.json index 7f250380..4a1ddcc4 100644 --- a/configs/biome-config/nestjs.json +++ b/configs/biome-config/nestjs.json @@ -15,9 +15,6 @@ "style": { "useImportType": "off" }, - "correctness": { - "useHookAtTopLevel": "off" - }, "a11y": { "recommended": false }, diff --git a/configs/biome-config/package.json b/configs/biome-config/package.json index af3af11e..6347e128 100644 --- a/configs/biome-config/package.json +++ b/configs/biome-config/package.json @@ -23,6 +23,7 @@ "main": "base.json", "exports": { ".": "./base.json", + "./react": "./react.json", "./nestjs": "./nestjs.json", "./solidjs": "./solidjs.json", "./nextjs": "./nextjs.json" diff --git a/configs/biome-config/react.json b/configs/biome-config/react.json new file mode 100644 index 00000000..41fab94b --- /dev/null +++ b/configs/biome-config/react.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.3.10/schema.json", + "linter": { + "rules": { + "complexity": { + "noUselessFragments": { + "level": "error", + "fix": "safe", + "options": {} + } + }, + "correctness": { + "useHookAtTopLevel": "error" + }, + "nursery": { + "noLeakedRender": "error", + "noDuplicatedSpreadProps": "error" + } + } + }, + "overrides": [ + { + "includes": ["**/*.jsx", "**/*.tsx"], + "linter": { + "rules": { + "style": { + "noImplicitBoolean": "off" + } + } + } + } + ] +} diff --git a/configs/biome-config/solidjs.json b/configs/biome-config/solidjs.json index 240f2e3c..1cab550a 100644 --- a/configs/biome-config/solidjs.json +++ b/configs/biome-config/solidjs.json @@ -7,9 +7,6 @@ "rules": { "suspicious": { "noReactSpecificProps": "error" - }, - "correctness": { - "useHookAtTopLevel": "off" } } }, From b7c367de6f3720c46c2c3203cc5859ee0518b0ec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 20 Dec 2025 18:43:35 +0000 Subject: [PATCH 3/3] fix(biome-config): correct grammar in README Co-authored-by: tutods <18479474+tutods@users.noreply.github.com> --- configs/biome-config/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/biome-config/README.md b/configs/biome-config/README.md index afb46c55..124f4e4e 100644 --- a/configs/biome-config/README.md +++ b/configs/biome-config/README.md @@ -26,7 +26,7 @@ This configuration package has the purpose of store my common configurations use ### 💡️ What you will find? -For now, you will found 5 configurations, being four of them based on the main one: +For now, you will find 5 configurations, being four of them based on the main one: - **`base.json`**: stores the basic/global configuration with comprehensive linting rules for JavaScript/TypeScript projects (framework-agnostic); - **`react.json`**: extends base configuration with React-specific linting rules (hooks, fragments, etc.);