-
-
Notifications
You must be signed in to change notification settings - Fork 207
feat: codegen and domains #3795
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ Rules that belong to the domain: | |
| - [noDocumentImportInPage](/linter/rules/no-document-import-in-page) (recommended) | ||
| - [noHeadImportInDocument](/linter/rules/no-head-import-in-document) (recommended) | ||
| ## Project | ||
| This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution, as well as type information. When enabling rules that belong to this domain, Biome will scan the entire project. The scanning phase will have a performance impact on the linting process. See the documentation on our [scanner](/internals/architecture/#scanner) to learn more about the scanner. | ||
| This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution. When enabling rules that belong to this domain, Biome will scan the entire project. The scanning phase will have a performance impact on the linting process. See the documentation on our [scanner](/internals/architecture/#scanner) to learn more about the scanner. | ||
| ### Project activation | ||
| Enable the **recommended, non-nursery** rules of the domain: | ||
| ```json title="biome.json" ins={3-5} | ||
|
|
@@ -93,16 +93,8 @@ Rules that belong to the domain: | |
| - [useImportExtensions](/linter/rules/use-import-extensions) | ||
| - [useJsonImportAttributes](/linter/rules/use-json-import-attributes) | ||
| - [noDeprecatedImports](/linter/rules/no-deprecated-imports) [(nursery)](/linter/#nursery) | ||
| - [noFloatingPromises](/linter/rules/no-floating-promises) [(nursery)](/linter/#nursery) | ||
| - [noImportCycles](/linter/rules/no-import-cycles) [(nursery)](/linter/#nursery) | ||
| - [noMisusedPromises](/linter/rules/no-misused-promises) [(nursery)](/linter/#nursery) | ||
| - [noUnnecessaryConditions](/linter/rules/no-unnecessary-conditions) [(nursery)](/linter/#nursery) | ||
| - [noUnresolvedImports](/linter/rules/no-unresolved-imports) [(nursery)](/linter/#nursery) | ||
| - [useArraySortCompare](/linter/rules/use-array-sort-compare) [(nursery)](/linter/#nursery) | ||
| - [useAwaitThenable](/linter/rules/use-await-thenable) [(nursery)](/linter/#nursery) | ||
| - [useExhaustiveSwitchCases](/linter/rules/use-exhaustive-switch-cases) [(nursery)](/linter/#nursery) | ||
| - [useFind](/linter/rules/use-find) [(nursery)](/linter/#nursery) | ||
| - [useRegexpExec](/linter/rules/use-regexp-exec) [(nursery)](/linter/#nursery) | ||
| ## Qwik | ||
| Use this domain inside Qwik projects. This domain enables rules that are specific to Qwik projects. | ||
| ### Qwik activation | ||
|
|
@@ -354,6 +346,53 @@ Enabled when the following dependencies are declared: | |
| ### Turborepo rules | ||
| Rules that belong to the domain: | ||
| - [noUndeclaredEnvVars](/linter/rules/no-undeclared-env-vars) [(nursery)](/linter/#nursery) | ||
| ## Types | ||
| This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution. When enabling rules that belong to this domain, Biome will scan the entire project, *and it will enable the inference engine to resolve and flat types*. The scanning phase will have a performance impact on the linting process. See the documentation on our [scanner](/internals/architecture/#scanner) to learn more about the scanner. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Grammar issue: "flat types" should be "flatten types". The phrase "resolve and flat types" contains a grammar error. It should read "resolve and flatten types" or "resolve and infer types". Since this file is auto-generated, the fix needs to be applied in the source code at 🤖 Prompt for AI Agents |
||
| ### Types activation | ||
| Enable the **recommended, non-nursery** rules of the domain: | ||
| ```json title="biome.json" ins={3-5} | ||
| { | ||
| "linter": { | ||
| "domains": { | ||
| "types": "recommended" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| :::note[No recommended rules] | ||
| Since all rules in this domain are nursery rules, no rules will be activated when using the "recommended" setting. Use "all" to enable all nursery rules in this domain. | ||
| ::: | ||
| Enabled the **all** rules of the domain: | ||
| ```json title="biome.json" ins={3-5} | ||
| { | ||
| "linter": { | ||
| "domains": { | ||
| "types": "all" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| **Disable** all rules of the domain: | ||
| ```json title="biome.json" ins={3-5} | ||
| { | ||
| "linter": { | ||
| "domains": { | ||
| "types": "none" | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| ### Types rules | ||
| Rules that belong to the domain: | ||
| - [noFloatingPromises](/linter/rules/no-floating-promises) [(nursery)](/linter/#nursery) | ||
| - [noMisusedPromises](/linter/rules/no-misused-promises) [(nursery)](/linter/#nursery) | ||
| - [noUnnecessaryConditions](/linter/rules/no-unnecessary-conditions) [(nursery)](/linter/#nursery) | ||
| - [useArraySortCompare](/linter/rules/use-array-sort-compare) [(nursery)](/linter/#nursery) | ||
| - [useAwaitThenable](/linter/rules/use-await-thenable) [(nursery)](/linter/#nursery) | ||
| - [useExhaustiveSwitchCases](/linter/rules/use-exhaustive-switch-cases) [(nursery)](/linter/#nursery) | ||
| - [useFind](/linter/rules/use-find) [(nursery)](/linter/#nursery) | ||
| - [useRegexpExec](/linter/rules/use-regexp-exec) [(nursery)](/linter/#nursery) | ||
| ## Vue | ||
| Use this domain inside Vue projects. This domain enables rules that are specific to Vue projects. | ||
| ### Vue activation | ||
|
|
||
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.
Minor wording issue: "flat types" should likely be "flatten types"
The phrase "resolve and flat types" on line 130 appears grammatically incorrect. Consider "resolve and flatten types" instead.
🔎 Proposed fix
RuleDomain::Types => { writeln!(buffer, "## {name}")?; writeln!( buffer, - "This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution. When enabling rules that belong to this domain, Biome will scan the entire project, *and it will enable the inference engine to resolve and flat types*. The scanning phase will have a performance impact on the linting process. See the documentation on our [scanner](/internals/architecture/#scanner) to learn more about the scanner." + "This domain contains rules that perform project-level analysis. This includes our module graph for dependency resolution. When enabling rules that belong to this domain, Biome will scan the entire project, *and it will enable the inference engine to resolve and flatten types*. The scanning phase will have a performance impact on the linting process. See the documentation on our [scanner](/internals/architecture/#scanner) to learn more about the scanner." )?; }📝 Committable suggestion
🤖 Prompt for AI Agents