-
-
Notifications
You must be signed in to change notification settings - Fork 975
feat(linter): preset #9813
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
Merged
feat(linter): preset #9813
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
83d1b77
feat(linter): preset
ematipico 664685b
[autofix.ci] apply automated fixes
autofix-ci[bot] 4947fe1
address feedback
ematipico 5cedc96
address feedback part 2
ematipico f10c143
oooops
ematipico 2cd175b
[autofix.ci] apply automated fixes
autofix-ci[bot] d8cb70c
fix snapshot
ematipico 20d74cd
whoops
ematipico 73fb409
build fix
ematipico e5f67fa
update tests
ematipico 9582a08
[autofix.ci] apply automated fixes
autofix-ci[bot] d5103e7
fix test
ematipico 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| "@biomejs/biome": minor | ||
| --- | ||
|
|
||
| Added a new linter configuration called `preset`. With the new option, users can enable different kinds of rules at once. | ||
|
|
||
| The following presets are available: | ||
| - `"recommended"`: it enables all Biome-recommended rules, or recommended rules of a group; | ||
| - `"all"`: it enables all Biome rules, or enables all rules of a group; | ||
| - `"none"`: it disables all Biome rules, or disable all rules of a group. | ||
|
|
||
| You can enable recommended rules: | ||
|
|
||
| ```json | ||
| { | ||
| "linter": { | ||
| "rules": { | ||
| "preset": "recommended" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| You can enable **all rules** at once: | ||
|
|
||
| ```json5 | ||
| { | ||
| "linter": { | ||
| "rules": { | ||
| "preset": "all" // enables all rules | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Or enable all rules for a group: | ||
| ```json5 | ||
| { | ||
| "linter": { | ||
| "rules": { | ||
| "style": { | ||
| "preset": "all" // enables all rules in the style group | ||
| }, | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| This new option, however, doesn't affect how nursery rules work. Nursery rules must be enabled singularly, due to their nature. | ||
|
|
||
| This new option is meant to replace `recommended`, so make sure to run the `migrate` command. | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.