-
-
Notifications
You must be signed in to change notification settings - Fork 928
chore: ensure force-ignore syntax works with nested biome.json #7444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arendjr
merged 1 commit into
biomejs:next
from
arendjr:ensure-force-ignoring-works-with-nested-biome-json
Sep 8, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
crates/biome_cli/tests/snapshots/main_cases_included_files/can_force_ignore_biome_json.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| --- | ||
| source: crates/biome_cli/tests/snap_test.rs | ||
| expression: redactor(content) | ||
| --- | ||
| ## `biome.json` | ||
|
|
||
| ```json | ||
| { "files": { "includes": ["**/*.js", "!!nested/biome.json"] } } | ||
| ``` | ||
|
|
||
| ## `nested/biome.json` | ||
|
|
||
| ```json | ||
| { "formatter": { "enabled": false } } | ||
| ``` | ||
|
|
||
| ## `a.js` | ||
|
|
||
| ```js | ||
| statement( ) | ||
| ``` | ||
|
|
||
| ## `nested/a.js` | ||
|
|
||
| ```js | ||
| statement( ) | ||
| ``` | ||
|
|
||
| # Termination Message | ||
|
|
||
| ```block | ||
| format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| × Some errors were emitted while running checks. | ||
|
|
||
|
|
||
|
|
||
| ``` | ||
|
|
||
| # Emitted Messages | ||
|
|
||
| ```block | ||
| a.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| × Formatter would have printed the following content: | ||
|
|
||
| 1 │ - ··statement(··)·· | ||
| 1 │ + statement(); | ||
| 2 │ + | ||
|
|
||
|
|
||
| ``` | ||
|
|
||
| ```block | ||
| biome.json format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| × Formatter would have printed the following content: | ||
|
|
||
| 1 │ - {·"files":·{·"includes":·["**/*.js",·"!!nested/biome.json"]·}·} | ||
| 1 │ + {·"files":·{·"includes":·["**/*.js",·"!!nested/biome.json"]·}·} | ||
| 2 │ + | ||
|
|
||
|
|
||
| ``` | ||
|
|
||
| ```block | ||
| nested/a.js format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| × Formatter would have printed the following content: | ||
|
|
||
| 1 │ - ··statement(··)·· | ||
| 1 │ + statement(); | ||
| 2 │ + | ||
|
|
||
|
|
||
| ``` | ||
|
|
||
| ```block | ||
| Checked 3 files in <TIME>. No fixes applied. | ||
| Found 3 errors. | ||
| ``` |
54 changes: 54 additions & 0 deletions
54
...me_cli/tests/snapshots/main_cases_included_files/errors_on_ignored_nested_biome_json.snap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| source: crates/biome_cli/tests/snap_test.rs | ||
| expression: redactor(content) | ||
| --- | ||
| ## `biome.json` | ||
|
|
||
| ```json | ||
| { "files": { "includes": ["**/*.js", "!nested/biome.json"] } } | ||
| ``` | ||
|
|
||
| ## `nested/biome.json` | ||
|
|
||
| ```json | ||
| { "formatter": { "enabled": false } } | ||
| ``` | ||
|
|
||
| ## `a.js` | ||
|
|
||
| ```js | ||
| statement( ) | ||
| ``` | ||
|
|
||
| ## `nested/a.js` | ||
|
|
||
| ```js | ||
| statement( ) | ||
| ``` | ||
|
|
||
| # Termination Message | ||
|
|
||
| ```block | ||
| configuration ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| × Biome exited because the configuration resulted in errors. Please fix them. | ||
|
|
||
|
|
||
|
|
||
| ``` | ||
|
|
||
| # Emitted Messages | ||
|
|
||
| ```block | ||
| <TEMP_DIR>/errors_on_ignored_nested_biome_json/nested/biome.json configuration ━━━━━━━━━━━━━━━━━━━━ | ||
|
|
||
| × Found a nested root configuration, but there's already a root configuration. | ||
|
|
||
| i The other configuration was found in <TEMP_DIR>/errors_on_ignored_nested_biome_json. | ||
|
|
||
| i Use the migration command from the root of the project to update the configuration. | ||
|
|
||
| $ biome migrate --write | ||
|
|
||
|
|
||
| ``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assertion contradicts the test name and changeset semantics.
Force-ignoring nested biome.json should be allowed; this test should pass, not error.
📝 Committable suggestion
🤖 Prompt for AI Agents