From 2dd43f1f0ccfdc0c5662213d82e89b6d21dfae86 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Fri, 19 Apr 2024 10:54:20 +0900 Subject: [PATCH 01/15] chore: rebase --- .../biome_configuration/src/linter/rules.rs | 48 +- crates/biome_css_analyze/src/lint/nursery.rs | 2 + .../src/lint/nursery/no_css_empty_block.rs | 72 + crates/biome_css_analyze/src/options.rs | 2 + .../specs/nursery/noCssEmptyBlock/invalid.css | 3 + .../specs/nursery/noCssEmptyBlock/valid.css | 2 + .../src/categories.rs | 1 + .../@biomejs/backend-jsonrpc/src/workspace.ts | 5 + .../@biomejs/biome/configuration_schema.json | 7 + website/.astro/types.d.ts | 2367 +++++++++++++++++ 10 files changed, 2491 insertions(+), 18 deletions(-) create mode 100644 crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css create mode 100644 website/.astro/types.d.ts diff --git a/crates/biome_configuration/src/linter/rules.rs b/crates/biome_configuration/src/linter/rules.rs index ed3495c7e71b..3ab3bbbd5e93 100644 --- a/crates/biome_configuration/src/linter/rules.rs +++ b/crates/biome_configuration/src/linter/rules.rs @@ -2656,6 +2656,9 @@ pub struct Nursery { #[doc = "Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant."] #[serde(skip_serializing_if = "Option::is_none")] pub no_constant_math_min_max_clamp: Option>, + #[doc = "Succinct description of the rule."] + #[serde(skip_serializing_if = "Option::is_none")] + pub no_css_empty_block: Option>, #[doc = "Disallow using a callback in asynchronous tests and hooks."] #[serde(skip_serializing_if = "Option::is_none")] pub no_done_callback: Option>, @@ -2716,6 +2719,7 @@ impl Nursery { "noColorInvalidHex", "noConsole", "noConstantMathMinMaxClamp", + "noCssEmptyBlock", "noDoneCallback", "noDuplicateElseIf", "noDuplicateFontNames", @@ -2739,12 +2743,12 @@ impl Nursery { "noFlatMapIdentity", ]; const RECOMMENDED_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[ - RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9]), ]; const ALL_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[ RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[0]), @@ -2794,47 +2798,51 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); } } - if let Some(rule) = self.no_done_callback.as_ref() { + if let Some(rule) = self.no_css_empty_block.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_duplicate_else_if.as_ref() { + if let Some(rule) = self.no_done_callback.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_duplicate_font_names.as_ref() { + if let Some(rule) = self.no_duplicate_else_if.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_duplicate_json_keys.as_ref() { + if let Some(rule) = self.no_duplicate_font_names.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.no_evolving_any.as_ref() { + if let Some(rule) = self.no_duplicate_json_keys.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.no_flat_map_identity.as_ref() { + if let Some(rule) = self.no_evolving_any.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.no_misplaced_assertion.as_ref() { + if let Some(rule) = self.no_flat_map_identity.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.no_nodejs_modules.as_ref() { + if let Some(rule) = self.no_misplaced_assertion.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } +<<<<<<< HEAD if let Some(rule) = self.no_react_specific_props.as_ref() { +======= + if let Some(rule) = self.no_nodejs_modules.as_ref() { +>>>>>>> 51963430b5 (chore: rebase) if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } @@ -2878,47 +2886,47 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[2])); } } - if let Some(rule) = self.no_done_callback.as_ref() { + if let Some(rule) = self.no_css_empty_block.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3])); } } - if let Some(rule) = self.no_duplicate_else_if.as_ref() { + if let Some(rule) = self.no_done_callback.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4])); } } - if let Some(rule) = self.no_duplicate_font_names.as_ref() { + if let Some(rule) = self.no_duplicate_else_if.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5])); } } - if let Some(rule) = self.no_duplicate_json_keys.as_ref() { + if let Some(rule) = self.no_duplicate_font_names.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6])); } } - if let Some(rule) = self.no_evolving_any.as_ref() { + if let Some(rule) = self.no_duplicate_json_keys.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[7])); } } - if let Some(rule) = self.no_flat_map_identity.as_ref() { + if let Some(rule) = self.no_evolving_any.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[8])); } } - if let Some(rule) = self.no_misplaced_assertion.as_ref() { + if let Some(rule) = self.no_flat_map_identity.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[9])); } } - if let Some(rule) = self.no_nodejs_modules.as_ref() { + if let Some(rule) = self.no_misplaced_assertion.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } - if let Some(rule) = self.no_react_specific_props.as_ref() { + if let Some(rule) = self.no_nodejs_modules.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } @@ -2991,6 +2999,10 @@ impl Nursery { .no_constant_math_min_max_clamp .as_ref() .map(|conf| (conf.level(), conf.get_options())), + "noCssEmptyBlock" => self + .no_css_empty_block + .as_ref() + .map(|conf| (conf.level(), conf.get_options())), "noDoneCallback" => self .no_done_callback .as_ref() diff --git a/crates/biome_css_analyze/src/lint/nursery.rs b/crates/biome_css_analyze/src/lint/nursery.rs index 75e80277d7fb..9a64205ed6ca 100644 --- a/crates/biome_css_analyze/src/lint/nursery.rs +++ b/crates/biome_css_analyze/src/lint/nursery.rs @@ -3,6 +3,7 @@ use biome_analyze::declare_group; pub mod no_color_invalid_hex; +pub mod no_css_empty_block; pub mod no_duplicate_font_names; declare_group! { @@ -10,6 +11,7 @@ declare_group! { name : "nursery" , rules : [ self :: no_color_invalid_hex :: NoColorInvalidHex , + self :: no_css_empty_block :: NoCssEmptyBlock , self :: no_duplicate_font_names :: NoDuplicateFontNames , ] } diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs new file mode 100644 index 000000000000..20f1de4aad4f --- /dev/null +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -0,0 +1,72 @@ +use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; +use biome_console::markup; +use biome_css_syntax::CssDeclarationOrRuleBlock; +use biome_rowan::AstNode; + +declare_rule! { + /// Succinct description of the rule. + /// + /// Put context and details about the rule. + /// As a starting point, you can take the description of the corresponding _ESLint_ rule (if any). + /// + /// Try to stay consistent with the descriptions of implemented rules. + /// + /// Add a link to the corresponding stylelint rule (if any): + /// + /// ## Examples + /// + /// ### Invalid + /// + /// ```css,expect_diagnostic + /// p {} + /// ``` + /// + /// ### Valid + /// + /// ```css + /// p { + /// color: red; + /// } + /// ``` + /// + pub NoCssEmptyBlock { + version: "next", + name: "noCssEmptyBlock", + recommended: false, + } +} + +impl Rule for NoCssEmptyBlock { + type Query = Ast; + type State = CssDeclarationOrRuleBlock; + type Signals = Option; + type Options = (); + + fn run(ctx: &RuleContext) -> Option { + let node = ctx.query(); + if node.items().into_iter().next().is_none() { + return Some(node.clone()); + } + None + } + + fn diagnostic(_: &RuleContext, node: &Self::State) -> Option { + // + // Read our guidelines to write great diagnostics: + // https://docs.rs/biome_analyze/latest/biome_analyze/#what-a-rule-should-say-to-the-user + // + let span = node.range(); + Some( + RuleDiagnostic::new( + rule_category!(), + span, + markup! { + "Unexpected empty block is not allowed" + }, + ) + .note(markup! { + "This note will give you more information." + }), + ) + } +} diff --git a/crates/biome_css_analyze/src/options.rs b/crates/biome_css_analyze/src/options.rs index e3f743001773..7a31a40e401e 100644 --- a/crates/biome_css_analyze/src/options.rs +++ b/crates/biome_css_analyze/src/options.rs @@ -4,5 +4,7 @@ use crate::lint; pub type NoColorInvalidHex = ::Options; +pub type NoCssEmptyBlock = + ::Options; pub type NoDuplicateFontNames = ::Options; diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css new file mode 100644 index 000000000000..d58e4390e601 --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css @@ -0,0 +1,3 @@ +var a = 1; +a = 2; +a = 3; \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css new file mode 100644 index 000000000000..f299f876959a --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css @@ -0,0 +1,2 @@ +/* should not generate diagnostics */ +// var a = 1; \ No newline at end of file diff --git a/crates/biome_diagnostics_categories/src/categories.rs b/crates/biome_diagnostics_categories/src/categories.rs index 603a8ff3cf30..6ec16f2dbfc3 100644 --- a/crates/biome_diagnostics_categories/src/categories.rs +++ b/crates/biome_diagnostics_categories/src/categories.rs @@ -113,6 +113,7 @@ define_categories! { "lint/nursery/noColorInvalidHex": "https://biomejs.dev/linter/rules/no-color-invalid-hex", "lint/nursery/noConsole": "https://biomejs.dev/linter/rules/no-console", "lint/nursery/noConstantMathMinMaxClamp": "https://biomejs.dev/linter/rules/no-constant-math-min-max-clamp", + "lint/nursery/noCssEmptyBlock": "https://biomejs.dev/linter/rules/no-css-empty-block", "lint/nursery/noDoneCallback": "https://biomejs.dev/linter/rules/no-done-callback", "lint/nursery/noDuplicateElseIf": "https://biomejs.dev/linter/rules/no-duplicate-else-if", "lint/nursery/noDuplicateFontNames": "https://biomejs.dev/linter/rules/no-font-family-duplicate-names", diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index bfe10770e117..05c311cfb80b 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -920,6 +920,10 @@ export interface Nursery { * Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant. */ noConstantMathMinMaxClamp?: RuleConfiguration_for_Null; + /** + * Succinct description of the rule. + */ + noCssEmptyBlock?: RuleConfiguration_for_Null; /** * Disallow using a callback in asynchronous tests and hooks. */ @@ -1929,6 +1933,7 @@ export type Category = | "lint/nursery/noColorInvalidHex" | "lint/nursery/noConsole" | "lint/nursery/noConstantMathMinMaxClamp" + | "lint/nursery/noCssEmptyBlock" | "lint/nursery/noDoneCallback" | "lint/nursery/noDuplicateElseIf" | "lint/nursery/noDuplicateFontNames" diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index 92ffbdec9830..e64570e387b1 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -1442,6 +1442,13 @@ { "type": "null" } ] }, + "noCssEmptyBlock": { + "description": "Succinct description of the rule.", + "anyOf": [ + { "$ref": "#/definitions/RuleConfiguration" }, + { "type": "null" } + ] + }, "noDoneCallback": { "description": "Disallow using a callback in asynchronous tests and hooks.", "anyOf": [ diff --git a/website/.astro/types.d.ts b/website/.astro/types.d.ts new file mode 100644 index 000000000000..d0af52874093 --- /dev/null +++ b/website/.astro/types.d.ts @@ -0,0 +1,2367 @@ +declare module 'astro:content' { + interface Render { + '.mdx': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } +} + +declare module 'astro:content' { + interface Render { + '.md': Promise<{ + Content: import('astro').MarkdownInstance<{}>['Content']; + headings: import('astro').MarkdownHeading[]; + remarkPluginFrontmatter: Record; + }>; + } +} + +declare module 'astro:content' { + type Flatten = T extends { [K: string]: infer U } ? U : never; + + export type CollectionKey = keyof AnyEntryMap; + export type CollectionEntry = Flatten; + + export type ContentCollectionKey = keyof ContentEntryMap; + export type DataCollectionKey = keyof DataEntryMap; + + type AllValuesOf = T extends any ? T[keyof T] : never; + type ValidContentEntrySlug = AllValuesOf< + ContentEntryMap[C] + >['slug']; + + export function getEntryBySlug< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + // Note that this has to accept a regular string too, for SSR + entrySlug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + + export function getDataEntryById( + collection: C, + entryId: E + ): Promise>; + + export function getCollection>( + collection: C, + filter?: (entry: CollectionEntry) => entry is E + ): Promise; + export function getCollection( + collection: C, + filter?: (entry: CollectionEntry) => unknown + ): Promise[]>; + + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >(entry: { + collection: C; + slug: E; + }): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >(entry: { + collection: C; + id: E; + }): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + export function getEntry< + C extends keyof ContentEntryMap, + E extends ValidContentEntrySlug | (string & {}), + >( + collection: C, + slug: E + ): E extends ValidContentEntrySlug + ? Promise> + : Promise | undefined>; + export function getEntry< + C extends keyof DataEntryMap, + E extends keyof DataEntryMap[C] | (string & {}), + >( + collection: C, + id: E + ): E extends keyof DataEntryMap[C] + ? Promise + : Promise | undefined>; + + /** Resolve an array of entry references from the same collection */ + export function getEntries( + entries: { + collection: C; + slug: ValidContentEntrySlug; + }[] + ): Promise[]>; + export function getEntries( + entries: { + collection: C; + id: keyof DataEntryMap[C]; + }[] + ): Promise[]>; + + export function reference( + collection: C + ): import('astro/zod').ZodEffects< + import('astro/zod').ZodString, + C extends keyof ContentEntryMap + ? { + collection: C; + slug: ValidContentEntrySlug; + } + : { + collection: C; + id: keyof DataEntryMap[C]; + } + >; + // Allow generic `string` to avoid excessive type errors in the config + // if `dev` is not running to update as you edit. + // Invalid collection names will be caught at build time. + export function reference( + collection: C + ): import('astro/zod').ZodEffects; + + type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; + type InferEntrySchema = import('astro/zod').infer< + ReturnTypeOrOriginal['schema']> + >; + + type ContentEntryMap = { + "blog": { +"annoucing-biome.mdx": { + id: "annoucing-biome.mdx"; + slug: "annoucing-biome"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"biome-v1-5.md": { + id: "biome-v1-5.md"; + slug: "biome-v1-5"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".md"] }; +"biome-v1-6.mdx": { + id: "biome-v1-6.mdx"; + slug: "biome-v1-6"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"biome-v1.mdx": { + id: "biome-v1.mdx"; + slug: "biome-v1"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".mdx"] }; +"biome-wins-prettier-challenge.md": { + id: "biome-wins-prettier-challenge.md"; + slug: "biome-wins-prettier-challenge"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".md"] }; +"roadmap-2024.md": { + id: "roadmap-2024.md"; + slug: "roadmap-2024"; + body: string; + collection: "blog"; + data: InferEntrySchema<"blog"> +} & { render(): Render[".md"] }; +}; +"docs": { +"404.md": { + id: "404.md"; + slug: "404"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"analyzer/import-sorting.mdx": { + id: "analyzer/import-sorting.mdx"; + slug: "analyzer/import-sorting"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"analyzer/index.mdx": { + id: "analyzer/index.mdx"; + slug: "analyzer"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"formatter/differences-with-prettier.md": { + id: "formatter/differences-with-prettier.md"; + slug: "formatter/differences-with-prettier"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"formatter/index.mdx": { + id: "formatter/index.mdx"; + slug: "formatter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"formatter/option-philosophy.md": { + id: "formatter/option-philosophy.md"; + slug: "formatter/option-philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"guides/big-projects.mdx": { + id: "guides/big-projects.mdx"; + slug: "guides/big-projects"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"guides/getting-started.mdx": { + id: "guides/getting-started.mdx"; + slug: "guides/getting-started"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"guides/how-biome-works.mdx": { + id: "guides/how-biome-works.mdx"; + slug: "guides/how-biome-works"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"guides/integrate-in-editor.mdx": { + id: "guides/integrate-in-editor.mdx"; + slug: "guides/integrate-in-editor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"guides/integrate-in-vcs.mdx": { + id: "guides/integrate-in-vcs.mdx"; + slug: "guides/integrate-in-vcs"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"guides/manual-installation.mdx": { + id: "guides/manual-installation.mdx"; + slug: "guides/manual-installation"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"index.mdx": { + id: "index.mdx"; + slug: "index"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"internals/architecture.mdx": { + id: "internals/architecture.mdx"; + slug: "internals/architecture"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"internals/changelog.md": { + id: "internals/changelog.md"; + slug: "internals/changelog"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"internals/credits.mdx": { + id: "internals/credits.mdx"; + slug: "internals/credits"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"internals/language-support.mdx": { + id: "internals/language-support.mdx"; + slug: "internals/language-support"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"internals/philosophy.mdx": { + id: "internals/philosophy.mdx"; + slug: "internals/philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"internals/versioning.mdx": { + id: "internals/versioning.mdx"; + slug: "internals/versioning"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/404.md": { + id: "ja/404.md"; + slug: "ja/404"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"ja/analyzer/import-sorting.mdx": { + id: "ja/analyzer/import-sorting.mdx"; + slug: "ja/analyzer/import-sorting"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/analyzer/index.mdx": { + id: "ja/analyzer/index.mdx"; + slug: "ja/analyzer"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/formatter/differences-with-prettier.md": { + id: "ja/formatter/differences-with-prettier.md"; + slug: "ja/formatter/differences-with-prettier"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"ja/formatter/index.mdx": { + id: "ja/formatter/index.mdx"; + slug: "ja/formatter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/formatter/option-philosophy.md": { + id: "ja/formatter/option-philosophy.md"; + slug: "ja/formatter/option-philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"ja/guides/big-projects.mdx": { + id: "ja/guides/big-projects.mdx"; + slug: "ja/guides/big-projects"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/guides/getting-started.mdx": { + id: "ja/guides/getting-started.mdx"; + slug: "ja/guides/getting-started"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/guides/how-biome-works.mdx": { + id: "ja/guides/how-biome-works.mdx"; + slug: "ja/guides/how-biome-works"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/guides/integrate-in-editor.mdx": { + id: "ja/guides/integrate-in-editor.mdx"; + slug: "ja/guides/integrate-in-editor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/guides/integrate-in-vcs.mdx": { + id: "ja/guides/integrate-in-vcs.mdx"; + slug: "ja/guides/integrate-in-vcs"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/guides/manual-installation.mdx": { + id: "ja/guides/manual-installation.mdx"; + slug: "ja/guides/manual-installation"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/index.mdx": { + id: "ja/index.mdx"; + slug: "ja"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/internals/architecture.mdx": { + id: "ja/internals/architecture.mdx"; + slug: "ja/internals/architecture"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/internals/credits.mdx": { + id: "ja/internals/credits.mdx"; + slug: "ja/internals/credits"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/internals/language-support.mdx": { + id: "ja/internals/language-support.mdx"; + slug: "ja/internals/language-support"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/internals/philosophy.mdx": { + id: "ja/internals/philosophy.mdx"; + slug: "ja/internals/philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/internals/versioning.mdx": { + id: "ja/internals/versioning.mdx"; + slug: "ja/internals/versioning"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/linter/index.mdx": { + id: "ja/linter/index.mdx"; + slug: "ja/linter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/recipes/continuous-integration.mdx": { + id: "ja/recipes/continuous-integration.mdx"; + slug: "ja/recipes/continuous-integration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/recipes/git-hooks.mdx": { + id: "ja/recipes/git-hooks.mdx"; + slug: "ja/recipes/git-hooks"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"ja/reference/vscode.mdx": { + id: "ja/reference/vscode.mdx"; + slug: "ja/reference/vscode"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"linter/index.mdx": { + id: "linter/index.mdx"; + slug: "linter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"linter/rules-sources.mdx": { + id: "linter/rules-sources.mdx"; + slug: "linter/rules-sources"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"linter/rules/index.mdx": { + id: "linter/rules/index.mdx"; + slug: "linter/rules"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"linter/rules/no-access-key.md": { + id: "linter/rules/no-access-key.md"; + slug: "linter/rules/no-access-key"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-accumulating-spread.md": { + id: "linter/rules/no-accumulating-spread.md"; + slug: "linter/rules/no-accumulating-spread"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-approximative-numeric-constant.md": { + id: "linter/rules/no-approximative-numeric-constant.md"; + slug: "linter/rules/no-approximative-numeric-constant"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-arguments.md": { + id: "linter/rules/no-arguments.md"; + slug: "linter/rules/no-arguments"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-aria-hidden-on-focusable.md": { + id: "linter/rules/no-aria-hidden-on-focusable.md"; + slug: "linter/rules/no-aria-hidden-on-focusable"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-aria-unsupported-elements.md": { + id: "linter/rules/no-aria-unsupported-elements.md"; + slug: "linter/rules/no-aria-unsupported-elements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-array-index-key.md": { + id: "linter/rules/no-array-index-key.md"; + slug: "linter/rules/no-array-index-key"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-assign-in-expressions.md": { + id: "linter/rules/no-assign-in-expressions.md"; + slug: "linter/rules/no-assign-in-expressions"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-async-promise-executor.md": { + id: "linter/rules/no-async-promise-executor.md"; + slug: "linter/rules/no-async-promise-executor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-autofocus.md": { + id: "linter/rules/no-autofocus.md"; + slug: "linter/rules/no-autofocus"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-banned-types.md": { + id: "linter/rules/no-banned-types.md"; + slug: "linter/rules/no-banned-types"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-barrel-file.md": { + id: "linter/rules/no-barrel-file.md"; + slug: "linter/rules/no-barrel-file"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-blank-target.md": { + id: "linter/rules/no-blank-target.md"; + slug: "linter/rules/no-blank-target"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-catch-assign.md": { + id: "linter/rules/no-catch-assign.md"; + slug: "linter/rules/no-catch-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-children-prop.md": { + id: "linter/rules/no-children-prop.md"; + slug: "linter/rules/no-children-prop"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-class-assign.md": { + id: "linter/rules/no-class-assign.md"; + slug: "linter/rules/no-class-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-color-invalid-hex.md": { + id: "linter/rules/no-color-invalid-hex.md"; + slug: "linter/rules/no-color-invalid-hex"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-comma-operator.md": { + id: "linter/rules/no-comma-operator.md"; + slug: "linter/rules/no-comma-operator"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-comment-text.md": { + id: "linter/rules/no-comment-text.md"; + slug: "linter/rules/no-comment-text"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-compare-neg-zero.md": { + id: "linter/rules/no-compare-neg-zero.md"; + slug: "linter/rules/no-compare-neg-zero"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-confusing-labels.md": { + id: "linter/rules/no-confusing-labels.md"; + slug: "linter/rules/no-confusing-labels"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-confusing-void-type.md": { + id: "linter/rules/no-confusing-void-type.md"; + slug: "linter/rules/no-confusing-void-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-console-log.md": { + id: "linter/rules/no-console-log.md"; + slug: "linter/rules/no-console-log"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-console.md": { + id: "linter/rules/no-console.md"; + slug: "linter/rules/no-console"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-const-assign.md": { + id: "linter/rules/no-const-assign.md"; + slug: "linter/rules/no-const-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-const-enum.md": { + id: "linter/rules/no-const-enum.md"; + slug: "linter/rules/no-const-enum"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-constant-condition.md": { + id: "linter/rules/no-constant-condition.md"; + slug: "linter/rules/no-constant-condition"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-constructor-return.md": { + id: "linter/rules/no-constructor-return.md"; + slug: "linter/rules/no-constructor-return"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-control-characters-in-regex.md": { + id: "linter/rules/no-control-characters-in-regex.md"; + slug: "linter/rules/no-control-characters-in-regex"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-dangerously-set-inner-html-with-children.md": { + id: "linter/rules/no-dangerously-set-inner-html-with-children.md"; + slug: "linter/rules/no-dangerously-set-inner-html-with-children"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-dangerously-set-inner-html.md": { + id: "linter/rules/no-dangerously-set-inner-html.md"; + slug: "linter/rules/no-dangerously-set-inner-html"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-debugger.md": { + id: "linter/rules/no-debugger.md"; + slug: "linter/rules/no-debugger"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-default-export.md": { + id: "linter/rules/no-default-export.md"; + slug: "linter/rules/no-default-export"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-delete.md": { + id: "linter/rules/no-delete.md"; + slug: "linter/rules/no-delete"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-distracting-elements.md": { + id: "linter/rules/no-distracting-elements.md"; + slug: "linter/rules/no-distracting-elements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-done-callback.md": { + id: "linter/rules/no-done-callback.md"; + slug: "linter/rules/no-done-callback"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-double-equals.md": { + id: "linter/rules/no-double-equals.md"; + slug: "linter/rules/no-double-equals"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-case.md": { + id: "linter/rules/no-duplicate-case.md"; + slug: "linter/rules/no-duplicate-case"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-class-members.md": { + id: "linter/rules/no-duplicate-class-members.md"; + slug: "linter/rules/no-duplicate-class-members"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-else-if.md": { + id: "linter/rules/no-duplicate-else-if.md"; + slug: "linter/rules/no-duplicate-else-if"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-font-names.md": { + id: "linter/rules/no-duplicate-font-names.md"; + slug: "linter/rules/no-duplicate-font-names"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-json-keys.md": { + id: "linter/rules/no-duplicate-json-keys.md"; + slug: "linter/rules/no-duplicate-json-keys"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-jsx-props.md": { + id: "linter/rules/no-duplicate-jsx-props.md"; + slug: "linter/rules/no-duplicate-jsx-props"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-object-keys.md": { + id: "linter/rules/no-duplicate-object-keys.md"; + slug: "linter/rules/no-duplicate-object-keys"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-parameters.md": { + id: "linter/rules/no-duplicate-parameters.md"; + slug: "linter/rules/no-duplicate-parameters"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-duplicate-test-hooks.md": { + id: "linter/rules/no-duplicate-test-hooks.md"; + slug: "linter/rules/no-duplicate-test-hooks"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-empty-block-statements.md": { + id: "linter/rules/no-empty-block-statements.md"; + slug: "linter/rules/no-empty-block-statements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-empty-character-class-in-regex.md": { + id: "linter/rules/no-empty-character-class-in-regex.md"; + slug: "linter/rules/no-empty-character-class-in-regex"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-empty-interface.md": { + id: "linter/rules/no-empty-interface.md"; + slug: "linter/rules/no-empty-interface"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-empty-pattern.md": { + id: "linter/rules/no-empty-pattern.md"; + slug: "linter/rules/no-empty-pattern"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-empty-type-parameters.md": { + id: "linter/rules/no-empty-type-parameters.md"; + slug: "linter/rules/no-empty-type-parameters"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-evolving-any.md": { + id: "linter/rules/no-evolving-any.md"; + slug: "linter/rules/no-evolving-any"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-excessive-cognitive-complexity.md": { + id: "linter/rules/no-excessive-cognitive-complexity.md"; + slug: "linter/rules/no-excessive-cognitive-complexity"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-excessive-nested-test-suites.md": { + id: "linter/rules/no-excessive-nested-test-suites.md"; + slug: "linter/rules/no-excessive-nested-test-suites"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-explicit-any.md": { + id: "linter/rules/no-explicit-any.md"; + slug: "linter/rules/no-explicit-any"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-exports-in-test.md": { + id: "linter/rules/no-exports-in-test.md"; + slug: "linter/rules/no-exports-in-test"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-extra-boolean-cast.md": { + id: "linter/rules/no-extra-boolean-cast.md"; + slug: "linter/rules/no-extra-boolean-cast"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-extra-non-null-assertion.md": { + id: "linter/rules/no-extra-non-null-assertion.md"; + slug: "linter/rules/no-extra-non-null-assertion"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-fallthrough-switch-clause.md": { + id: "linter/rules/no-fallthrough-switch-clause.md"; + slug: "linter/rules/no-fallthrough-switch-clause"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-focused-tests.md": { + id: "linter/rules/no-focused-tests.md"; + slug: "linter/rules/no-focused-tests"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-for-each.md": { + id: "linter/rules/no-for-each.md"; + slug: "linter/rules/no-for-each"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-function-assign.md": { + id: "linter/rules/no-function-assign.md"; + slug: "linter/rules/no-function-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-global-assign.md": { + id: "linter/rules/no-global-assign.md"; + slug: "linter/rules/no-global-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-global-eval.md": { + id: "linter/rules/no-global-eval.md"; + slug: "linter/rules/no-global-eval"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-global-is-finite.md": { + id: "linter/rules/no-global-is-finite.md"; + slug: "linter/rules/no-global-is-finite"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-global-is-nan.md": { + id: "linter/rules/no-global-is-nan.md"; + slug: "linter/rules/no-global-is-nan"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-global-object-calls.md": { + id: "linter/rules/no-global-object-calls.md"; + slug: "linter/rules/no-global-object-calls"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-header-scope.md": { + id: "linter/rules/no-header-scope.md"; + slug: "linter/rules/no-header-scope"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-implicit-any-let.md": { + id: "linter/rules/no-implicit-any-let.md"; + slug: "linter/rules/no-implicit-any-let"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-implicit-boolean.md": { + id: "linter/rules/no-implicit-boolean.md"; + slug: "linter/rules/no-implicit-boolean"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-import-assign.md": { + id: "linter/rules/no-import-assign.md"; + slug: "linter/rules/no-import-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-inferrable-types.md": { + id: "linter/rules/no-inferrable-types.md"; + slug: "linter/rules/no-inferrable-types"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-inner-declarations.md": { + id: "linter/rules/no-inner-declarations.md"; + slug: "linter/rules/no-inner-declarations"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-interactive-element-to-noninteractive-role.md": { + id: "linter/rules/no-interactive-element-to-noninteractive-role.md"; + slug: "linter/rules/no-interactive-element-to-noninteractive-role"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-invalid-constructor-super.md": { + id: "linter/rules/no-invalid-constructor-super.md"; + slug: "linter/rules/no-invalid-constructor-super"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-invalid-new-builtin.md": { + id: "linter/rules/no-invalid-new-builtin.md"; + slug: "linter/rules/no-invalid-new-builtin"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-invalid-use-before-declaration.md": { + id: "linter/rules/no-invalid-use-before-declaration.md"; + slug: "linter/rules/no-invalid-use-before-declaration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-label-var.md": { + id: "linter/rules/no-label-var.md"; + slug: "linter/rules/no-label-var"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-misleading-character-class.md": { + id: "linter/rules/no-misleading-character-class.md"; + slug: "linter/rules/no-misleading-character-class"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-misleading-instantiator.md": { + id: "linter/rules/no-misleading-instantiator.md"; + slug: "linter/rules/no-misleading-instantiator"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-misplaced-assertion.md": { + id: "linter/rules/no-misplaced-assertion.md"; + slug: "linter/rules/no-misplaced-assertion"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-misrefactored-shorthand-assign.md": { + id: "linter/rules/no-misrefactored-shorthand-assign.md"; + slug: "linter/rules/no-misrefactored-shorthand-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-multiple-spaces-in-regular-expression-literals.md": { + id: "linter/rules/no-multiple-spaces-in-regular-expression-literals.md"; + slug: "linter/rules/no-multiple-spaces-in-regular-expression-literals"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-namespace-import.md": { + id: "linter/rules/no-namespace-import.md"; + slug: "linter/rules/no-namespace-import"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-namespace.md": { + id: "linter/rules/no-namespace.md"; + slug: "linter/rules/no-namespace"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-negation-else.md": { + id: "linter/rules/no-negation-else.md"; + slug: "linter/rules/no-negation-else"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-new-symbol.md": { + id: "linter/rules/no-new-symbol.md"; + slug: "linter/rules/no-new-symbol"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-nodejs-modules.md": { + id: "linter/rules/no-nodejs-modules.md"; + slug: "linter/rules/no-nodejs-modules"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-non-null-assertion.md": { + id: "linter/rules/no-non-null-assertion.md"; + slug: "linter/rules/no-non-null-assertion"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-noninteractive-element-to-interactive-role.md": { + id: "linter/rules/no-noninteractive-element-to-interactive-role.md"; + slug: "linter/rules/no-noninteractive-element-to-interactive-role"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-noninteractive-tabindex.md": { + id: "linter/rules/no-noninteractive-tabindex.md"; + slug: "linter/rules/no-noninteractive-tabindex"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-nonoctal-decimal-escape.md": { + id: "linter/rules/no-nonoctal-decimal-escape.md"; + slug: "linter/rules/no-nonoctal-decimal-escape"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-parameter-assign.md": { + id: "linter/rules/no-parameter-assign.md"; + slug: "linter/rules/no-parameter-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-parameter-properties.md": { + id: "linter/rules/no-parameter-properties.md"; + slug: "linter/rules/no-parameter-properties"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-positive-tabindex.md": { + id: "linter/rules/no-positive-tabindex.md"; + slug: "linter/rules/no-positive-tabindex"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-precision-loss.md": { + id: "linter/rules/no-precision-loss.md"; + slug: "linter/rules/no-precision-loss"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-prototype-builtins.md": { + id: "linter/rules/no-prototype-builtins.md"; + slug: "linter/rules/no-prototype-builtins"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-re-export-all.md": { + id: "linter/rules/no-re-export-all.md"; + slug: "linter/rules/no-re-export-all"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-redeclare.md": { + id: "linter/rules/no-redeclare.md"; + slug: "linter/rules/no-redeclare"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-redundant-alt.md": { + id: "linter/rules/no-redundant-alt.md"; + slug: "linter/rules/no-redundant-alt"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-redundant-roles.md": { + id: "linter/rules/no-redundant-roles.md"; + slug: "linter/rules/no-redundant-roles"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-redundant-use-strict.md": { + id: "linter/rules/no-redundant-use-strict.md"; + slug: "linter/rules/no-redundant-use-strict"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-render-return-value.md": { + id: "linter/rules/no-render-return-value.md"; + slug: "linter/rules/no-render-return-value"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-restricted-globals.md": { + id: "linter/rules/no-restricted-globals.md"; + slug: "linter/rules/no-restricted-globals"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-restricted-imports.md": { + id: "linter/rules/no-restricted-imports.md"; + slug: "linter/rules/no-restricted-imports"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-self-assign.md": { + id: "linter/rules/no-self-assign.md"; + slug: "linter/rules/no-self-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-self-compare.md": { + id: "linter/rules/no-self-compare.md"; + slug: "linter/rules/no-self-compare"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-setter-return.md": { + id: "linter/rules/no-setter-return.md"; + slug: "linter/rules/no-setter-return"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-shadow-restricted-names.md": { + id: "linter/rules/no-shadow-restricted-names.md"; + slug: "linter/rules/no-shadow-restricted-names"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-shouty-constants.md": { + id: "linter/rules/no-shouty-constants.md"; + slug: "linter/rules/no-shouty-constants"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-skipped-tests.md": { + id: "linter/rules/no-skipped-tests.md"; + slug: "linter/rules/no-skipped-tests"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-sparse-array.md": { + id: "linter/rules/no-sparse-array.md"; + slug: "linter/rules/no-sparse-array"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-static-only-class.md": { + id: "linter/rules/no-static-only-class.md"; + slug: "linter/rules/no-static-only-class"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-string-case-mismatch.md": { + id: "linter/rules/no-string-case-mismatch.md"; + slug: "linter/rules/no-string-case-mismatch"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-suspicious-semicolon-in-jsx.md": { + id: "linter/rules/no-suspicious-semicolon-in-jsx.md"; + slug: "linter/rules/no-suspicious-semicolon-in-jsx"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-svg-without-title.md": { + id: "linter/rules/no-svg-without-title.md"; + slug: "linter/rules/no-svg-without-title"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-switch-declarations.md": { + id: "linter/rules/no-switch-declarations.md"; + slug: "linter/rules/no-switch-declarations"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-then-property.md": { + id: "linter/rules/no-then-property.md"; + slug: "linter/rules/no-then-property"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-this-in-static.md": { + id: "linter/rules/no-this-in-static.md"; + slug: "linter/rules/no-this-in-static"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-undeclared-dependencies.md": { + id: "linter/rules/no-undeclared-dependencies.md"; + slug: "linter/rules/no-undeclared-dependencies"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-undeclared-variables.md": { + id: "linter/rules/no-undeclared-variables.md"; + slug: "linter/rules/no-undeclared-variables"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unnecessary-continue.md": { + id: "linter/rules/no-unnecessary-continue.md"; + slug: "linter/rules/no-unnecessary-continue"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unreachable-super.md": { + id: "linter/rules/no-unreachable-super.md"; + slug: "linter/rules/no-unreachable-super"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unreachable.md": { + id: "linter/rules/no-unreachable.md"; + slug: "linter/rules/no-unreachable"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unsafe-declaration-merging.md": { + id: "linter/rules/no-unsafe-declaration-merging.md"; + slug: "linter/rules/no-unsafe-declaration-merging"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unsafe-finally.md": { + id: "linter/rules/no-unsafe-finally.md"; + slug: "linter/rules/no-unsafe-finally"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unsafe-negation.md": { + id: "linter/rules/no-unsafe-negation.md"; + slug: "linter/rules/no-unsafe-negation"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unsafe-optional-chaining.md": { + id: "linter/rules/no-unsafe-optional-chaining.md"; + slug: "linter/rules/no-unsafe-optional-chaining"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unused-imports.md": { + id: "linter/rules/no-unused-imports.md"; + slug: "linter/rules/no-unused-imports"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unused-labels.md": { + id: "linter/rules/no-unused-labels.md"; + slug: "linter/rules/no-unused-labels"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unused-private-class-members.md": { + id: "linter/rules/no-unused-private-class-members.md"; + slug: "linter/rules/no-unused-private-class-members"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unused-template-literal.md": { + id: "linter/rules/no-unused-template-literal.md"; + slug: "linter/rules/no-unused-template-literal"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-unused-variables.md": { + id: "linter/rules/no-unused-variables.md"; + slug: "linter/rules/no-unused-variables"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-catch.md": { + id: "linter/rules/no-useless-catch.md"; + slug: "linter/rules/no-useless-catch"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-constructor.md": { + id: "linter/rules/no-useless-constructor.md"; + slug: "linter/rules/no-useless-constructor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-else.md": { + id: "linter/rules/no-useless-else.md"; + slug: "linter/rules/no-useless-else"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-empty-export.md": { + id: "linter/rules/no-useless-empty-export.md"; + slug: "linter/rules/no-useless-empty-export"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-fragments.md": { + id: "linter/rules/no-useless-fragments.md"; + slug: "linter/rules/no-useless-fragments"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-label.md": { + id: "linter/rules/no-useless-label.md"; + slug: "linter/rules/no-useless-label"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-lone-block-statements.md": { + id: "linter/rules/no-useless-lone-block-statements.md"; + slug: "linter/rules/no-useless-lone-block-statements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-rename.md": { + id: "linter/rules/no-useless-rename.md"; + slug: "linter/rules/no-useless-rename"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-switch-case.md": { + id: "linter/rules/no-useless-switch-case.md"; + slug: "linter/rules/no-useless-switch-case"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-ternary.md": { + id: "linter/rules/no-useless-ternary.md"; + slug: "linter/rules/no-useless-ternary"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-this-alias.md": { + id: "linter/rules/no-useless-this-alias.md"; + slug: "linter/rules/no-useless-this-alias"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-useless-type-constraint.md": { + id: "linter/rules/no-useless-type-constraint.md"; + slug: "linter/rules/no-useless-type-constraint"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-var.md": { + id: "linter/rules/no-var.md"; + slug: "linter/rules/no-var"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-void-elements-with-children.md": { + id: "linter/rules/no-void-elements-with-children.md"; + slug: "linter/rules/no-void-elements-with-children"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-void-type-return.md": { + id: "linter/rules/no-void-type-return.md"; + slug: "linter/rules/no-void-type-return"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-void.md": { + id: "linter/rules/no-void.md"; + slug: "linter/rules/no-void"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/no-with.md": { + id: "linter/rules/no-with.md"; + slug: "linter/rules/no-with"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-alt-text.md": { + id: "linter/rules/use-alt-text.md"; + slug: "linter/rules/use-alt-text"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-anchor-content.md": { + id: "linter/rules/use-anchor-content.md"; + slug: "linter/rules/use-anchor-content"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-aria-activedescendant-with-tabindex.md": { + id: "linter/rules/use-aria-activedescendant-with-tabindex.md"; + slug: "linter/rules/use-aria-activedescendant-with-tabindex"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-aria-props-for-role.md": { + id: "linter/rules/use-aria-props-for-role.md"; + slug: "linter/rules/use-aria-props-for-role"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-arrow-function.md": { + id: "linter/rules/use-arrow-function.md"; + slug: "linter/rules/use-arrow-function"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-as-const-assertion.md": { + id: "linter/rules/use-as-const-assertion.md"; + slug: "linter/rules/use-as-const-assertion"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-await.md": { + id: "linter/rules/use-await.md"; + slug: "linter/rules/use-await"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-block-statements.md": { + id: "linter/rules/use-block-statements.md"; + slug: "linter/rules/use-block-statements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-button-type.md": { + id: "linter/rules/use-button-type.md"; + slug: "linter/rules/use-button-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-collapsed-else-if.md": { + id: "linter/rules/use-collapsed-else-if.md"; + slug: "linter/rules/use-collapsed-else-if"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-consistent-array-type.md": { + id: "linter/rules/use-consistent-array-type.md"; + slug: "linter/rules/use-consistent-array-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-const.md": { + id: "linter/rules/use-const.md"; + slug: "linter/rules/use-const"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-default-parameter-last.md": { + id: "linter/rules/use-default-parameter-last.md"; + slug: "linter/rules/use-default-parameter-last"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-default-switch-clause-last.md": { + id: "linter/rules/use-default-switch-clause-last.md"; + slug: "linter/rules/use-default-switch-clause-last"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-enum-initializers.md": { + id: "linter/rules/use-enum-initializers.md"; + slug: "linter/rules/use-enum-initializers"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-exhaustive-dependencies.md": { + id: "linter/rules/use-exhaustive-dependencies.md"; + slug: "linter/rules/use-exhaustive-dependencies"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-exponentiation-operator.md": { + id: "linter/rules/use-exponentiation-operator.md"; + slug: "linter/rules/use-exponentiation-operator"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-export-type.md": { + id: "linter/rules/use-export-type.md"; + slug: "linter/rules/use-export-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-filenaming-convention.md": { + id: "linter/rules/use-filenaming-convention.md"; + slug: "linter/rules/use-filenaming-convention"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-flat-map.md": { + id: "linter/rules/use-flat-map.md"; + slug: "linter/rules/use-flat-map"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-for-of.md": { + id: "linter/rules/use-for-of.md"; + slug: "linter/rules/use-for-of"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-fragment-syntax.md": { + id: "linter/rules/use-fragment-syntax.md"; + slug: "linter/rules/use-fragment-syntax"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-getter-return.md": { + id: "linter/rules/use-getter-return.md"; + slug: "linter/rules/use-getter-return"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-heading-content.md": { + id: "linter/rules/use-heading-content.md"; + slug: "linter/rules/use-heading-content"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-hook-at-top-level.md": { + id: "linter/rules/use-hook-at-top-level.md"; + slug: "linter/rules/use-hook-at-top-level"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-html-lang.md": { + id: "linter/rules/use-html-lang.md"; + slug: "linter/rules/use-html-lang"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-iframe-title.md": { + id: "linter/rules/use-iframe-title.md"; + slug: "linter/rules/use-iframe-title"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-import-restrictions.md": { + id: "linter/rules/use-import-restrictions.md"; + slug: "linter/rules/use-import-restrictions"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-import-type.md": { + id: "linter/rules/use-import-type.md"; + slug: "linter/rules/use-import-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-is-array.md": { + id: "linter/rules/use-is-array.md"; + slug: "linter/rules/use-is-array"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-is-nan.md": { + id: "linter/rules/use-is-nan.md"; + slug: "linter/rules/use-is-nan"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-jsx-key-in-iterable.md": { + id: "linter/rules/use-jsx-key-in-iterable.md"; + slug: "linter/rules/use-jsx-key-in-iterable"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-key-with-click-events.md": { + id: "linter/rules/use-key-with-click-events.md"; + slug: "linter/rules/use-key-with-click-events"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-key-with-mouse-events.md": { + id: "linter/rules/use-key-with-mouse-events.md"; + slug: "linter/rules/use-key-with-mouse-events"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-literal-enum-members.md": { + id: "linter/rules/use-literal-enum-members.md"; + slug: "linter/rules/use-literal-enum-members"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-literal-keys.md": { + id: "linter/rules/use-literal-keys.md"; + slug: "linter/rules/use-literal-keys"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-media-caption.md": { + id: "linter/rules/use-media-caption.md"; + slug: "linter/rules/use-media-caption"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-namespace-keyword.md": { + id: "linter/rules/use-namespace-keyword.md"; + slug: "linter/rules/use-namespace-keyword"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-naming-convention.md": { + id: "linter/rules/use-naming-convention.md"; + slug: "linter/rules/use-naming-convention"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-node-assert-strict.md": { + id: "linter/rules/use-node-assert-strict.md"; + slug: "linter/rules/use-node-assert-strict"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-nodejs-import-protocol.md": { + id: "linter/rules/use-nodejs-import-protocol.md"; + slug: "linter/rules/use-nodejs-import-protocol"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-number-namespace.md": { + id: "linter/rules/use-number-namespace.md"; + slug: "linter/rules/use-number-namespace"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-numeric-literals.md": { + id: "linter/rules/use-numeric-literals.md"; + slug: "linter/rules/use-numeric-literals"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-optional-chain.md": { + id: "linter/rules/use-optional-chain.md"; + slug: "linter/rules/use-optional-chain"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-regex-literals.md": { + id: "linter/rules/use-regex-literals.md"; + slug: "linter/rules/use-regex-literals"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-self-closing-elements.md": { + id: "linter/rules/use-self-closing-elements.md"; + slug: "linter/rules/use-self-closing-elements"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-shorthand-array-type.md": { + id: "linter/rules/use-shorthand-array-type.md"; + slug: "linter/rules/use-shorthand-array-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-shorthand-assign.md": { + id: "linter/rules/use-shorthand-assign.md"; + slug: "linter/rules/use-shorthand-assign"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-shorthand-function-type.md": { + id: "linter/rules/use-shorthand-function-type.md"; + slug: "linter/rules/use-shorthand-function-type"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-simple-number-keys.md": { + id: "linter/rules/use-simple-number-keys.md"; + slug: "linter/rules/use-simple-number-keys"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-simplified-logic-expression.md": { + id: "linter/rules/use-simplified-logic-expression.md"; + slug: "linter/rules/use-simplified-logic-expression"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-single-case-statement.md": { + id: "linter/rules/use-single-case-statement.md"; + slug: "linter/rules/use-single-case-statement"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-single-var-declarator.md": { + id: "linter/rules/use-single-var-declarator.md"; + slug: "linter/rules/use-single-var-declarator"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-sorted-classes.md": { + id: "linter/rules/use-sorted-classes.md"; + slug: "linter/rules/use-sorted-classes"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-template.md": { + id: "linter/rules/use-template.md"; + slug: "linter/rules/use-template"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-anchor.md": { + id: "linter/rules/use-valid-anchor.md"; + slug: "linter/rules/use-valid-anchor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-aria-props.md": { + id: "linter/rules/use-valid-aria-props.md"; + slug: "linter/rules/use-valid-aria-props"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-aria-role.md": { + id: "linter/rules/use-valid-aria-role.md"; + slug: "linter/rules/use-valid-aria-role"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-aria-values.md": { + id: "linter/rules/use-valid-aria-values.md"; + slug: "linter/rules/use-valid-aria-values"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-for-direction.md": { + id: "linter/rules/use-valid-for-direction.md"; + slug: "linter/rules/use-valid-for-direction"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-lang.md": { + id: "linter/rules/use-valid-lang.md"; + slug: "linter/rules/use-valid-lang"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-valid-typeof.md": { + id: "linter/rules/use-valid-typeof.md"; + slug: "linter/rules/use-valid-typeof"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-while.md": { + id: "linter/rules/use-while.md"; + slug: "linter/rules/use-while"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"linter/rules/use-yield.md": { + id: "linter/rules/use-yield.md"; + slug: "linter/rules/use-yield"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"pt-br/404.md": { + id: "pt-br/404.md"; + slug: "pt-br/404"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"pt-br/analyzer/import-sorting.mdx": { + id: "pt-br/analyzer/import-sorting.mdx"; + slug: "pt-br/analyzer/import-sorting"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/analyzer/index.mdx": { + id: "pt-br/analyzer/index.mdx"; + slug: "pt-br/analyzer"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/formatter/differences-with-prettier.md": { + id: "pt-br/formatter/differences-with-prettier.md"; + slug: "pt-br/formatter/differences-with-prettier"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"pt-br/formatter/index.mdx": { + id: "pt-br/formatter/index.mdx"; + slug: "pt-br/formatter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/formatter/option-philosophy.md": { + id: "pt-br/formatter/option-philosophy.md"; + slug: "pt-br/formatter/option-philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"pt-br/guides/big-projects.mdx": { + id: "pt-br/guides/big-projects.mdx"; + slug: "pt-br/guides/big-projects"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/guides/getting-started.mdx": { + id: "pt-br/guides/getting-started.mdx"; + slug: "pt-br/guides/getting-started"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/guides/how-biome-works.mdx": { + id: "pt-br/guides/how-biome-works.mdx"; + slug: "pt-br/guides/how-biome-works"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/guides/integrate-in-editor.mdx": { + id: "pt-br/guides/integrate-in-editor.mdx"; + slug: "pt-br/guides/integrate-in-editor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/guides/integrate-in-vcs.mdx": { + id: "pt-br/guides/integrate-in-vcs.mdx"; + slug: "pt-br/guides/integrate-in-vcs"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/guides/manual-installation.mdx": { + id: "pt-br/guides/manual-installation.mdx"; + slug: "pt-br/guides/manual-installation"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/index.mdx": { + id: "pt-br/index.mdx"; + slug: "pt-br"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/internals/architecture.mdx": { + id: "pt-br/internals/architecture.mdx"; + slug: "pt-br/internals/architecture"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/internals/credits.mdx": { + id: "pt-br/internals/credits.mdx"; + slug: "pt-br/internals/credits"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/internals/language-support.mdx": { + id: "pt-br/internals/language-support.mdx"; + slug: "pt-br/internals/language-support"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/internals/philosophy.mdx": { + id: "pt-br/internals/philosophy.mdx"; + slug: "pt-br/internals/philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/internals/versioning.mdx": { + id: "pt-br/internals/versioning.mdx"; + slug: "pt-br/internals/versioning"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/linter/index.mdx": { + id: "pt-br/linter/index.mdx"; + slug: "pt-br/linter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/recipes/continuous-integration.mdx": { + id: "pt-br/recipes/continuous-integration.mdx"; + slug: "pt-br/recipes/continuous-integration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/recipes/git-hooks.mdx": { + id: "pt-br/recipes/git-hooks.mdx"; + slug: "pt-br/recipes/git-hooks"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"pt-br/reference/vscode.mdx": { + id: "pt-br/reference/vscode.mdx"; + slug: "pt-br/reference/vscode"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"recipes/continuous-integration.mdx": { + id: "recipes/continuous-integration.mdx"; + slug: "recipes/continuous-integration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"recipes/git-hooks.mdx": { + id: "recipes/git-hooks.mdx"; + slug: "recipes/git-hooks"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"reference/cli.mdx": { + id: "reference/cli.mdx"; + slug: "reference/cli"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"reference/configuration.mdx": { + id: "reference/configuration.mdx"; + slug: "reference/configuration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"reference/vscode.mdx": { + id: "reference/vscode.mdx"; + slug: "reference/vscode"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/analyzer/import-sorting.mdx": { + id: "zh-cn/analyzer/import-sorting.mdx"; + slug: "zh-cn/analyzer/import-sorting"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/analyzer/index.mdx": { + id: "zh-cn/analyzer/index.mdx"; + slug: "zh-cn/analyzer"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/formatter/differences-with-prettier.md": { + id: "zh-cn/formatter/differences-with-prettier.md"; + slug: "zh-cn/formatter/differences-with-prettier"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"zh-cn/formatter/index.mdx": { + id: "zh-cn/formatter/index.mdx"; + slug: "zh-cn/formatter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/formatter/option-philosophy.md": { + id: "zh-cn/formatter/option-philosophy.md"; + slug: "zh-cn/formatter/option-philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".md"] }; +"zh-cn/guides/big-projects.mdx": { + id: "zh-cn/guides/big-projects.mdx"; + slug: "zh-cn/guides/big-projects"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/guides/getting-started.mdx": { + id: "zh-cn/guides/getting-started.mdx"; + slug: "zh-cn/guides/getting-started"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/guides/how-biome-works.mdx": { + id: "zh-cn/guides/how-biome-works.mdx"; + slug: "zh-cn/guides/how-biome-works"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/guides/integrate-in-editor.mdx": { + id: "zh-cn/guides/integrate-in-editor.mdx"; + slug: "zh-cn/guides/integrate-in-editor"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/guides/integrate-in-vcs.mdx": { + id: "zh-cn/guides/integrate-in-vcs.mdx"; + slug: "zh-cn/guides/integrate-in-vcs"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/guides/manual-installation.mdx": { + id: "zh-cn/guides/manual-installation.mdx"; + slug: "zh-cn/guides/manual-installation"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/index.mdx": { + id: "zh-cn/index.mdx"; + slug: "zh-cn"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/internals/architecture.mdx": { + id: "zh-cn/internals/architecture.mdx"; + slug: "zh-cn/internals/architecture"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/internals/changelog.mdx": { + id: "zh-cn/internals/changelog.mdx"; + slug: "zh-cn/internals/changelog"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/internals/credits.mdx": { + id: "zh-cn/internals/credits.mdx"; + slug: "zh-cn/internals/credits"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/internals/language-support.mdx": { + id: "zh-cn/internals/language-support.mdx"; + slug: "zh-cn/internals/language-support"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/internals/philosophy.mdx": { + id: "zh-cn/internals/philosophy.mdx"; + slug: "zh-cn/internals/philosophy"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/internals/versioning.mdx": { + id: "zh-cn/internals/versioning.mdx"; + slug: "zh-cn/internals/versioning"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/linter/index.mdx": { + id: "zh-cn/linter/index.mdx"; + slug: "zh-cn/linter"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/recipes/continuous-integration.mdx": { + id: "zh-cn/recipes/continuous-integration.mdx"; + slug: "zh-cn/recipes/continuous-integration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/recipes/git-hooks.mdx": { + id: "zh-cn/recipes/git-hooks.mdx"; + slug: "zh-cn/recipes/git-hooks"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/reference/configuration.mdx": { + id: "zh-cn/reference/configuration.mdx"; + slug: "zh-cn/reference/configuration"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +"zh-cn/reference/vscode.mdx": { + id: "zh-cn/reference/vscode.mdx"; + slug: "zh-cn/reference/vscode"; + body: string; + collection: "docs"; + data: InferEntrySchema<"docs"> +} & { render(): Render[".mdx"] }; +}; + + }; + + type DataEntryMap = { + "authors": { +"core": { + id: "core"; + collection: "authors"; + data: InferEntrySchema<"authors"> +}; +"ema": { + id: "ema"; + collection: "authors"; + data: InferEntrySchema<"authors"> +}; +"team": { + id: "team"; + collection: "authors"; + data: InferEntrySchema<"authors"> +}; +}; + + }; + + type AnyEntryMap = ContentEntryMap & DataEntryMap; + + export type ContentConfig = typeof import("../src/content/config.js"); +} From 1b522e4d521e098d0994128fd55eead520f1deab Mon Sep 17 00:00:00 2001 From: togami2864 Date: Tue, 16 Apr 2024 22:14:07 +0900 Subject: [PATCH 02/15] chore: tests --- .../specs/nursery/noCssEmptyBlock/invalid.css | 15 ++++++++++++--- .../noCssEmptyBlock/invalidComment.config.js | 0 .../nursery/noCssEmptyBlock/invalidComment.css | 3 +++ .../tests/specs/nursery/noCssEmptyBlock/valid.css | 11 +++++++++-- 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.js create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css index d58e4390e601..dfc6bb19f32f 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css @@ -1,3 +1,12 @@ -var a = 1; -a = 2; -a = 3; \ No newline at end of file +a {} +a {} +a {\n} +a {\r\n} +a {\n\n} +a {\t} +a {\t\t} +@media print {} +@media print {\n} +@media print {\r\n} +@media print {\t} +@media print { a {} } \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.js b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.js new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css new file mode 100644 index 000000000000..e5a34cacf0bc --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css @@ -0,0 +1,3 @@ +a { /* foo */ color: pink; } +a {\n/* foo */\ncolor: pink;\n} +@import "foo.css"; \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css index f299f876959a..fbf775c83704 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css @@ -1,2 +1,9 @@ -/* should not generate diagnostics */ -// var a = 1; \ No newline at end of file +@import "foo.css"; +a { color: pink; } +a { /* foo */ } +a {\n/* foo */\n} +a {\n/* foo */\n/* bar */\n} +a {\n/*\nfoo\nbar\n*/\n} +@media print { a { color: pink; } } +@media print { a { /* foo */ } } +@import url(x.css) \ No newline at end of file From 0a417a7b8b30aed634cc64115e8b6928db958b4e Mon Sep 17 00:00:00 2001 From: togami2864 Date: Wed, 17 Apr 2024 21:27:06 +0900 Subject: [PATCH 03/15] chore: update snapshot --- .../nursery/noCssEmptyBlock/invalid.css.snap | 83 +++++++++++++++++++ .../noCssEmptyBlock/invalidComment.css.snap | 10 +++ .../nursery/noCssEmptyBlock/valid.css.snap | 50 +++++++++++ 3 files changed, 143 insertions(+) create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap new file mode 100644 index 000000000000..c9350f40e818 --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap @@ -0,0 +1,83 @@ +--- +source: crates/biome_css_analyze/tests/spec_tests.rs +expression: invalid.css +--- +# Input +```css +a {} +a {} +a {\n} +a {\r\n} +a {\n\n} +a {\t} +a {\t\t} +@media print {} +@media print {\n} +@media print {\r\n} +@media print {\t} +@media print { a {} } +``` + +# Diagnostics +``` +invalid.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + > 1 │ a {} + │ ^^ + 2 │ a {} + 3 │ a {\n} + + i This note will give you more information. + + +``` + +``` +invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 1 │ a {} + > 2 │ a {} + │ ^^ + 3 │ a {\n} + 4 │ a {\r\n} + + i This note will give you more information. + + +``` + +``` +invalid.css:8:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 6 │ a {\t} + 7 │ a {\t\t} + > 8 │ @media print {} + │ ^^ + 9 │ @media print {\n} + 10 │ @media print {\r\n} + + i This note will give you more information. + + +``` + +``` +invalid.css:12:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 10 │ @media print {\r\n} + 11 │ @media print {\t} + > 12 │ @media print { a {} } + │ ^^ + + i This note will give you more information. + + +``` diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap new file mode 100644 index 000000000000..14c7db90b81f --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap @@ -0,0 +1,10 @@ +--- +source: crates/biome_css_analyze/tests/spec_tests.rs +expression: invalidComment.css +--- +# Input +```css +a { /* foo */ color: pink; } +a {\n/* foo */\ncolor: pink;\n} +@import "foo.css"; +``` diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap new file mode 100644 index 000000000000..61eac0c6a8dc --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap @@ -0,0 +1,50 @@ +--- +source: crates/biome_css_analyze/tests/spec_tests.rs +expression: valid.css +--- +# Input +```css +@import "foo.css"; +a { color: pink; } +a { /* foo */ } +a {\n/* foo */\n} +a {\n/* foo */\n/* bar */\n} +a {\n/*\nfoo\nbar\n*/\n} +@media print { a { color: pink; } } +@media print { a { /* foo */ } } +@import url(x.css) +``` + +# Diagnostics +``` +valid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 1 │ @import "foo.css"; + 2 │ a { color: pink; } + > 3 │ a { /* foo */ } + │ ^^^^^^^^^^^^^ + 4 │ a {\n/* foo */\n} + 5 │ a {\n/* foo */\n/* bar */\n} + + i This note will give you more information. + + +``` + +``` +valid.css:8:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 6 │ a {\n/*\nfoo\nbar\n*/\n} + 7 │ @media print { a { color: pink; } } + > 8 │ @media print { a { /* foo */ } } + │ ^^^^^^^^^^^^^ + 9 │ @import url(x.css) + + i This note will give you more information. + + +``` From 5fa78f5420093a46044b99cfde9e49e767a3eab2 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Wed, 17 Apr 2024 22:01:09 +0900 Subject: [PATCH 04/15] feat: impl basic --- .../src/lint/nursery/no_css_empty_block.rs | 17 ++- .../specs/nursery/noCssEmptyBlock/invalid.css | 23 ++-- .../nursery/noCssEmptyBlock/invalid.css.snap | 112 ++++++++++++++---- .../specs/nursery/noCssEmptyBlock/valid.css | 13 +- .../nursery/noCssEmptyBlock/valid.css.snap | 47 ++------ 5 files changed, 134 insertions(+), 78 deletions(-) diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 20f1de4aad4f..d249b2ed3c0b 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -1,4 +1,4 @@ -use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic}; +use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic, RuleSource}; use biome_console::markup; use biome_css_syntax::CssDeclarationOrRuleBlock; use biome_rowan::AstNode; @@ -32,10 +32,18 @@ declare_rule! { pub NoCssEmptyBlock { version: "next", name: "noCssEmptyBlock", - recommended: false, + recommended: true, + sources: &[RuleSource::Stylelint("no-empty-block")], } } +// #[derive(Clone, Debug, Default, Deserialize, Deserializable, Eq, PartialEq, Serialize)] +// #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] +// #[serde(rename_all = "camelCase", deny_unknown_fields)] +// pub struct NoCssEmptyBlockOptions { +// ignore: Vec, +// } + impl Rule for NoCssEmptyBlock { type Query = Ast; type State = CssDeclarationOrRuleBlock; @@ -44,7 +52,10 @@ impl Rule for NoCssEmptyBlock { fn run(ctx: &RuleContext) -> Option { let node = ctx.query(); - if node.items().into_iter().next().is_none() { + if node.items().into_iter().next().is_none() + && !node.r_curly_token().ok()?.has_leading_comments() + && !node.l_curly_token().ok()?.has_trailing_comments() + { return Some(node.clone()); } None diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css index dfc6bb19f32f..3b81c31ff24f 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css @@ -1,12 +1,17 @@ a {} -a {} -a {\n} -a {\r\n} -a {\n\n} -a {\t} -a {\t\t} +a { } +a { + +} + +.b {} +.b { } +.b { + +} + @media print {} -@media print {\n} -@media print {\r\n} -@media print {\t} +@media print { + +} @media print { a {} } \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap index c9350f40e818..6cffb9a3b6e3 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap @@ -5,16 +5,21 @@ expression: invalid.css # Input ```css a {} -a {} -a {\n} -a {\r\n} -a {\n\n} -a {\t} -a {\t\t} +a { } +a { + +} + +.b {} +.b { } +.b { + +} + @media print {} -@media print {\n} -@media print {\r\n} -@media print {\t} +@media print { + +} @media print { a {} } ``` @@ -26,8 +31,8 @@ invalid.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ > 1 │ a {} │ ^^ - 2 │ a {} - 3 │ a {\n} + 2 │ a { } + 3 │ a { i This note will give you more information. @@ -40,10 +45,63 @@ invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ! Unexpected empty block is not allowed 1 │ a {} - > 2 │ a {} - │ ^^ - 3 │ a {\n} - 4 │ a {\r\n} + > 2 │ a { } + │ ^^^ + 3 │ a { + 4 │ + + i This note will give you more information. + + +``` + +``` +invalid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 1 │ a {} + 2 │ a { } + > 3 │ a { + │ ^ + > 4 │ + > 5 │ } + │ ^ + 6 │ + 7 │ .b {} + + i This note will give you more information. + + +``` + +``` +invalid.css:7:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 5 │ } + 6 │ + > 7 │ .b {} + │ ^^ + 8 │ .b { } + 9 │ .b { + + i This note will give you more information. + + +``` + +``` +invalid.css:8:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 7 │ .b {} + > 8 │ .b { } + │ ^^^ + 9 │ .b { + 10 │ i This note will give you more information. @@ -51,16 +109,19 @@ invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` ``` -invalid.css:8:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:9:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 6 │ a {\t} - 7 │ a {\t\t} - > 8 │ @media print {} - │ ^^ - 9 │ @media print {\n} - 10 │ @media print {\r\n} + 7 │ .b {} + 8 │ .b { } + > 9 │ .b { + │ ^ + > 10 │ + > 11 │ } + │ ^ + 12 │ + 13 │ @media print {} i This note will give you more information. @@ -68,13 +129,12 @@ invalid.css:8:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` ``` -invalid.css:12:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:17:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 10 │ @media print {\r\n} - 11 │ @media print {\t} - > 12 │ @media print { a {} } + 16 │ } + > 17 │ @media print { a {} } │ ^^ i This note will give you more information. diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css index fbf775c83704..8e0621e5ff78 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css @@ -1,9 +1,16 @@ @import "foo.css"; a { color: pink; } a { /* foo */ } -a {\n/* foo */\n} -a {\n/* foo */\n/* bar */\n} -a {\n/*\nfoo\nbar\n*/\n} +a { + /* foo */ +} +a { + /* foo */ + /* bar */ +} +a { + /*\nfoo\nbar\n*/ +} @media print { a { color: pink; } } @media print { a { /* foo */ } } @import url(x.css) \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap index 61eac0c6a8dc..f4ef2ee9eee4 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap @@ -7,44 +7,17 @@ expression: valid.css @import "foo.css"; a { color: pink; } a { /* foo */ } -a {\n/* foo */\n} -a {\n/* foo */\n/* bar */\n} -a {\n/*\nfoo\nbar\n*/\n} +a { + /* foo */ +} +a { + /* foo */ + /* bar */ +} +a { + /*\nfoo\nbar\n*/ +} @media print { a { color: pink; } } @media print { a { /* foo */ } } @import url(x.css) ``` - -# Diagnostics -``` -valid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - ! Unexpected empty block is not allowed - - 1 │ @import "foo.css"; - 2 │ a { color: pink; } - > 3 │ a { /* foo */ } - │ ^^^^^^^^^^^^^ - 4 │ a {\n/* foo */\n} - 5 │ a {\n/* foo */\n/* bar */\n} - - i This note will give you more information. - - -``` - -``` -valid.css:8:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - ! Unexpected empty block is not allowed - - 6 │ a {\n/*\nfoo\nbar\n*/\n} - 7 │ @media print { a { color: pink; } } - > 8 │ @media print { a { /* foo */ } } - │ ^^^^^^^^^^^^^ - 9 │ @import url(x.css) - - i This note will give you more information. - - -``` From 803765bf08146ccfe8c7ac1263b9c2056b0809b2 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Wed, 17 Apr 2024 23:21:31 +0900 Subject: [PATCH 05/15] feat: gen options --- Cargo.lock | 4 +++ crates/biome_configuration/Cargo.toml | 1 + .../biome_configuration/src/linter/rules.rs | 2 ++ crates/biome_css_analyze/Cargo.toml | 19 +++++++++----- .../src/lint/nursery/no_css_empty_block.rs | 20 +++++++++------ .../noCssEmptyBlock/invalidComment.config.js | 0 .../invalidComment.config.json | 15 +++++++++++ .../@biomejs/backend-jsonrpc/src/workspace.ts | 12 ++++++++- .../@biomejs/biome/configuration_schema.json | 25 ++++++++++++++++++- 9 files changed, 83 insertions(+), 15 deletions(-) delete mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.js create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json diff --git a/Cargo.lock b/Cargo.lock index dca8fe6b2bc6..2b7a1d52c466 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -257,11 +257,15 @@ dependencies = [ "biome_console", "biome_css_parser", "biome_css_syntax", + "biome_deserialize", + "biome_deserialize_macros", "biome_diagnostics", "biome_rowan", "biome_test_utils", "insta", "lazy_static", + "schemars", + "serde", "tests_macros", ] diff --git a/crates/biome_configuration/Cargo.toml b/crates/biome_configuration/Cargo.toml index ab271b16c4ee..ac3f90dd6b80 100644 --- a/crates/biome_configuration/Cargo.toml +++ b/crates/biome_configuration/Cargo.toml @@ -42,6 +42,7 @@ serde_json = { workspace = true, features = ["raw_value"] } schema = [ "dep:schemars", "biome_js_analyze/schema", + "biome_css_analyze/schema", "biome_formatter/serde", "biome_json_syntax/schema", "biome_css_syntax/schema", diff --git a/crates/biome_configuration/src/linter/rules.rs b/crates/biome_configuration/src/linter/rules.rs index 3ab3bbbd5e93..1900734ce2b7 100644 --- a/crates/biome_configuration/src/linter/rules.rs +++ b/crates/biome_configuration/src/linter/rules.rs @@ -2735,6 +2735,7 @@ impl Nursery { "useSortedClasses", ]; const RECOMMENDED_RULES: &'static [&'static str] = &[ + "noCssEmptyBlock", "noDoneCallback", "noDuplicateElseIf", "noDuplicateFontNames", @@ -2743,6 +2744,7 @@ impl Nursery { "noFlatMapIdentity", ]; const RECOMMENDED_RULES_AS_FILTERS: &'static [RuleFilter<'static>] = &[ + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[3]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[4]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[5]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[6]), diff --git a/crates/biome_css_analyze/Cargo.toml b/crates/biome_css_analyze/Cargo.toml index 669af7a91108..187489002128 100644 --- a/crates/biome_css_analyze/Cargo.toml +++ b/crates/biome_css_analyze/Cargo.toml @@ -13,12 +13,16 @@ version = "0.5.7" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -biome_analyze = { workspace = true } -biome_console = { workspace = true } -biome_css_syntax = { workspace = true } -biome_diagnostics = { workspace = true } -biome_rowan = { workspace = true } -lazy_static = { workspace = true } +biome_analyze = { workspace = true } +biome_console = { workspace = true } +biome_css_syntax = { workspace = true } +biome_deserialize = { workspace = true } +biome_deserialize_macros = { workspace = true } +biome_diagnostics = { workspace = true } +biome_rowan = { workspace = true } +lazy_static = { workspace = true } +schemars = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"] } [dev-dependencies] biome_css_parser = { path = "../biome_css_parser" } @@ -26,5 +30,8 @@ biome_test_utils = { path = "../biome_test_utils" } insta = { workspace = true, features = ["glob"] } tests_macros = { path = "../tests_macros" } +[features] +schema = ["schemars", "biome_deserialize/schema"] + [lints] workspace = true diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index d249b2ed3c0b..1309ee6b44ff 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -1,7 +1,9 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic, RuleSource}; use biome_console::markup; use biome_css_syntax::CssDeclarationOrRuleBlock; +use biome_deserialize_macros::Deserializable; use biome_rowan::AstNode; +use serde::{Deserialize, Serialize}; declare_rule! { /// Succinct description of the rule. @@ -37,24 +39,28 @@ declare_rule! { } } -// #[derive(Clone, Debug, Default, Deserialize, Deserializable, Eq, PartialEq, Serialize)] -// #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] -// #[serde(rename_all = "camelCase", deny_unknown_fields)] -// pub struct NoCssEmptyBlockOptions { -// ignore: Vec, -// } +#[derive(Clone, Debug, Default, Serialize, Deserialize, Deserializable, Eq, PartialEq)] +#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub struct NoCssEmptyBlockOptions { + ignore: Vec, +} impl Rule for NoCssEmptyBlock { type Query = Ast; type State = CssDeclarationOrRuleBlock; type Signals = Option; - type Options = (); + type Options = NoCssEmptyBlockOptions; fn run(ctx: &RuleContext) -> Option { let node = ctx.query(); + let options = ctx.options(); + let is_ignore_comment = options.ignore.iter().any(|i| i == "comment"); + if node.items().into_iter().next().is_none() && !node.r_curly_token().ok()?.has_leading_comments() && !node.l_curly_token().ok()?.has_trailing_comments() + && !is_ignore_comment { return Some(node.clone()); } diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.js b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.js deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json new file mode 100644 index 000000000000..0d947122b952 --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json @@ -0,0 +1,15 @@ +{ + "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", + "linter": { + "rules": { + "nursery": { + "noCssEmptyBlock": { + "level": "error", + "options": { + "ignore": ["comment"] + } + } + } + } + } +} diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index 05c311cfb80b..75dbff5a1716 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -923,7 +923,7 @@ export interface Nursery { /** * Succinct description of the rule. */ - noCssEmptyBlock?: RuleConfiguration_for_Null; + noCssEmptyBlock?: RuleConfiguration_for_NoCssEmptyBlockOptions; /** * Disallow using a callback in asynchronous tests and hooks. */ @@ -1515,6 +1515,9 @@ export type RuleConfiguration_for_HooksOptions = export type RuleConfiguration_for_DeprecatedHooksOptions = | RulePlainConfiguration | RuleWithOptions_for_DeprecatedHooksOptions; +export type RuleConfiguration_for_NoCssEmptyBlockOptions = + | RulePlainConfiguration + | RuleWithOptions_for_NoCssEmptyBlockOptions; export type RuleConfiguration_for_RestrictedImportsOptions = | RulePlainConfiguration | RuleWithOptions_for_RestrictedImportsOptions; @@ -1554,6 +1557,10 @@ export interface RuleWithOptions_for_DeprecatedHooksOptions { level: RulePlainConfiguration; options: DeprecatedHooksOptions; } +export interface RuleWithOptions_for_NoCssEmptyBlockOptions { + level: RulePlainConfiguration; + options: NoCssEmptyBlockOptions; +} export interface RuleWithOptions_for_RestrictedImportsOptions { level: RulePlainConfiguration; options: RestrictedImportsOptions; @@ -1604,6 +1611,9 @@ export interface HooksOptions { * Options for the `useHookAtTopLevel` rule have been deprecated, since we now use the React hook naming convention to determine whether a function is a hook. */ export interface DeprecatedHooksOptions {} +export interface NoCssEmptyBlockOptions { + ignore: string[]; +} /** * Options for the rule `noRestrictedImports`. */ diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index e64570e387b1..de64d638d00b 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -1413,6 +1413,20 @@ }, "additionalProperties": false }, + "NoCssEmptyBlockConfiguration": { + "anyOf": [ + { "$ref": "#/definitions/RulePlainConfiguration" }, + { "$ref": "#/definitions/RuleWithNoCssEmptyBlockOptions" } + ] + }, + "NoCssEmptyBlockOptions": { + "type": "object", + "required": ["ignore"], + "properties": { + "ignore": { "type": "array", "items": { "type": "string" } } + }, + "additionalProperties": false + }, "Nursery": { "description": "A list of rules that belong to this group", "type": "object", @@ -1445,7 +1459,7 @@ "noCssEmptyBlock": { "description": "Succinct description of the rule.", "anyOf": [ - { "$ref": "#/definitions/RuleConfiguration" }, + { "$ref": "#/definitions/NoCssEmptyBlockConfiguration" }, { "type": "null" } ] }, @@ -1847,6 +1861,15 @@ }, "additionalProperties": false }, + "RuleWithNoCssEmptyBlockOptions": { + "type": "object", + "required": ["level", "options"], + "properties": { + "level": { "$ref": "#/definitions/RulePlainConfiguration" }, + "options": { "$ref": "#/definitions/NoCssEmptyBlockOptions" } + }, + "additionalProperties": false + }, "RuleWithNoOptions": { "type": "object", "required": ["level"], From 7bd7cbc39dff46b59cb37e6cb3f19078164c8c62 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Thu, 18 Apr 2024 00:52:06 +0900 Subject: [PATCH 06/15] feat: set option --- .../src/lint/nursery/no_css_empty_block.rs | 14 ++++--- .../invalidComment.config.json | 15 ------- .../noCssEmptyBlock/invalidComment.css | 7 ++-- .../noCssEmptyBlock/invalidComment.css.snap | 40 +++++++++++++++++-- .../invalidComment.options.json | 17 ++++++++ crates/biome_service/src/configuration.rs | 6 ++- 6 files changed, 71 insertions(+), 28 deletions(-) delete mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.options.json diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 1309ee6b44ff..804beb47b05e 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -43,27 +43,31 @@ declare_rule! { #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NoCssEmptyBlockOptions { - ignore: Vec, + pub ignore: Vec, } impl Rule for NoCssEmptyBlock { type Query = Ast; type State = CssDeclarationOrRuleBlock; type Signals = Option; - type Options = NoCssEmptyBlockOptions; + type Options = Box; fn run(ctx: &RuleContext) -> Option { let node = ctx.query(); let options = ctx.options(); - let is_ignore_comment = options.ignore.iter().any(|i| i == "comment"); + let should_alert_comments = options.ignore.iter().any(|i| i == "comments"); - if node.items().into_iter().next().is_none() + if should_alert_comments { + if node.items().into_iter().next().is_none() { + return Some(node.clone()); + } + } else if node.items().into_iter().next().is_none() && !node.r_curly_token().ok()?.has_leading_comments() && !node.l_curly_token().ok()?.has_trailing_comments() - && !is_ignore_comment { return Some(node.clone()); } + None } diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json deleted file mode 100644 index 0d947122b952..000000000000 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.config.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", - "linter": { - "rules": { - "nursery": { - "noCssEmptyBlock": { - "level": "error", - "options": { - "ignore": ["comment"] - } - } - } - } - } -} diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css index e5a34cacf0bc..03c6fb89b13b 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css @@ -1,3 +1,4 @@ -a { /* foo */ color: pink; } -a {\n/* foo */\ncolor: pink;\n} -@import "foo.css"; \ No newline at end of file +a { /* foo */ } +a { + /* foo */ +} \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap index 14c7db90b81f..d70767b106af 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap @@ -4,7 +4,41 @@ expression: invalidComment.css --- # Input ```css -a { /* foo */ color: pink; } -a {\n/* foo */\ncolor: pink;\n} -@import "foo.css"; +a { /* foo */ } +a { + /* foo */ +} +``` + +# Diagnostics +``` +invalidComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + > 1 │ a { /* foo */ } + │ ^^^^^^^^^^^^^ + 2 │ a { + 3 │ /* foo */ + + i This note will give you more information. + + +``` + +``` +invalidComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 1 │ a { /* foo */ } + > 2 │ a { + │ ^ + > 3 │ /* foo */ + > 4 │ } + │ ^ + + i This note will give you more information. + + ``` diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.options.json b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.options.json new file mode 100644 index 000000000000..45d2a75e8085 --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.options.json @@ -0,0 +1,17 @@ +{ + "$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json", + "linter": { + "rules": { + "nursery": { + "noCssEmptyBlock": { + "level": "error", + "options": { + "ignore": [ + "comments" + ] + } + } + } + } + } +} diff --git a/crates/biome_service/src/configuration.rs b/crates/biome_service/src/configuration.rs index e9d20f652a7f..7efa5a13e37b 100644 --- a/crates/biome_service/src/configuration.rs +++ b/crates/biome_service/src/configuration.rs @@ -7,11 +7,12 @@ use biome_configuration::{ PartialConfiguration, }; use biome_console::markup; +use biome_css_analyze::metadata as css_lint_metadata; use biome_deserialize::json::deserialize_from_json_str; use biome_deserialize::{Deserialized, Merge}; use biome_diagnostics::{DiagnosticExt, Error, Severity}; use biome_fs::{AutoSearchResult, ConfigName, FileSystem, OpenOptions}; -use biome_js_analyze::metadata; +use biome_js_analyze::metadata as js_lint_metadata; use biome_json_formatter::context::JsonFormatOptions; use biome_json_parser::{parse_json, JsonParserOptions}; use std::ffi::OsStr; @@ -321,7 +322,8 @@ pub fn to_analyzer_rules(settings: &WorkspaceSettings, path: &Path) -> AnalyzerR let overrides = &settings.override_settings; let mut analyzer_rules = AnalyzerRules::default(); if let Some(rules) = linter_settings.rules.as_ref() { - push_to_analyzer_rules(rules, metadata(), &mut analyzer_rules); + push_to_analyzer_rules(rules, js_lint_metadata(), &mut analyzer_rules); + push_to_analyzer_rules(rules, css_lint_metadata(), &mut analyzer_rules); } overrides.override_analyzer_rules(path, analyzer_rules) From beb49b7a8a651d33142167beab8009516668625f Mon Sep 17 00:00:00 2001 From: togami2864 Date: Thu, 18 Apr 2024 21:47:55 +0900 Subject: [PATCH 07/15] chore: update invalid test cases --- .../specs/nursery/noCssEmptyBlock/invalid.css | 40 ++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css index 3b81c31ff24f..3692b4ed5b41 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css @@ -1,3 +1,4 @@ +/* CssDeclarationOrRuleBlock */ a {} a { } a { @@ -10,8 +11,45 @@ a { } +/* CssRuleBlock */ @media print {} @media print { } -@media print { a {} } \ No newline at end of file +@media print { a {} } + +/* CssDeclarationBlock */ +@font-palette-values --ident {} +@font-face {} + +/* CssKeyframesBlock */ +@keyframes slidein {} +@keyframes slidein { + from { + } + + to { + transform: translateX(100%); + } + } + +/* CssFontFeatureValuesBlock */ +@font-feature-values Font One { + @styleset { + + } +} + +/* CssPageAtRuleBlock */ +@page {} +@page :right { +} + + +/* CssDeclarationOrAtRuleBlock */ +@page :left { @left-middle {} background: red; } +@page { + @top-right { + + } +} \ No newline at end of file From 4d397d5be418060a885eda0ace0dbef4ae2c96e6 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Thu, 18 Apr 2024 22:16:22 +0900 Subject: [PATCH 08/15] feat: improve basic impl --- .../src/lint/nursery/no_css_empty_block.rs | 28 ++++++----- crates/biome_css_syntax/src/lib.rs | 1 + crates/biome_css_syntax/src/stmt_ext.rs | 48 +++++++++++++++++++ 3 files changed, 65 insertions(+), 12 deletions(-) create mode 100644 crates/biome_css_syntax/src/stmt_ext.rs diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 804beb47b05e..908de53ee12d 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -1,6 +1,6 @@ use biome_analyze::{context::RuleContext, declare_rule, Ast, Rule, RuleDiagnostic, RuleSource}; use biome_console::markup; -use biome_css_syntax::CssDeclarationOrRuleBlock; +use biome_css_syntax::stmt_ext::CssBlockLike; use biome_deserialize_macros::Deserializable; use biome_rowan::AstNode; use serde::{Deserialize, Serialize}; @@ -47,25 +47,29 @@ pub struct NoCssEmptyBlockOptions { } impl Rule for NoCssEmptyBlock { - type Query = Ast; - type State = CssDeclarationOrRuleBlock; + type Query = Ast; + type State = CssBlockLike; type Signals = Option; type Options = Box; fn run(ctx: &RuleContext) -> Option { let node = ctx.query(); let options = ctx.options(); - let should_alert_comments = options.ignore.iter().any(|i| i == "comments"); + let disallow_comments_inside_empty_block = options.ignore.iter().any(|i| i == "comments"); - if should_alert_comments { - if node.items().into_iter().next().is_none() { + if disallow_comments_inside_empty_block { + if node.is_empty() { + return Some(node.clone()); + } + } else if node.is_empty() { + let has_comments_inside_block = node.r_curly_token().ok()?.has_leading_comments() + && node.l_curly_token().ok()?.has_trailing_comments(); + + if has_comments_inside_block { + return None; + } else { return Some(node.clone()); } - } else if node.items().into_iter().next().is_none() - && !node.r_curly_token().ok()?.has_leading_comments() - && !node.l_curly_token().ok()?.has_trailing_comments() - { - return Some(node.clone()); } None @@ -86,7 +90,7 @@ impl Rule for NoCssEmptyBlock { }, ) .note(markup! { - "This note will give you more information." + "Consider removing the empty block or adding styles inside it." }), ) } diff --git a/crates/biome_css_syntax/src/lib.rs b/crates/biome_css_syntax/src/lib.rs index 27da932b6322..c604745cf239 100644 --- a/crates/biome_css_syntax/src/lib.rs +++ b/crates/biome_css_syntax/src/lib.rs @@ -1,6 +1,7 @@ #[macro_use] mod file_source; mod generated; +pub mod stmt_ext; mod syntax_node; pub use self::generated::*; diff --git a/crates/biome_css_syntax/src/stmt_ext.rs b/crates/biome_css_syntax/src/stmt_ext.rs new file mode 100644 index 000000000000..23ac09280501 --- /dev/null +++ b/crates/biome_css_syntax/src/stmt_ext.rs @@ -0,0 +1,48 @@ +use crate::generated::{ + CssDeclarationBlock, CssDeclarationOrAtRuleBlock, CssDeclarationOrRuleBlock, + CssFontFeatureValuesBlock, CssKeyframesBlock, CssPageAtRuleBlock, CssRuleBlock, +}; +use crate::CssSyntaxToken; +use biome_rowan::{declare_node_union, AstNodeList, SyntaxResult}; + +declare_node_union! { + pub CssBlockLike = CssKeyframesBlock | CssDeclarationOrAtRuleBlock | CssDeclarationBlock | CssRuleBlock | CssFontFeatureValuesBlock | CssPageAtRuleBlock | CssDeclarationOrRuleBlock +} + +impl CssBlockLike { + pub fn l_curly_token(&self) -> SyntaxResult { + match self { + CssBlockLike::CssKeyframesBlock(block) => block.l_curly_token(), + CssBlockLike::CssDeclarationOrAtRuleBlock(block) => block.l_curly_token(), + CssBlockLike::CssDeclarationBlock(block) => block.l_curly_token(), + CssBlockLike::CssRuleBlock(block) => block.l_curly_token(), + CssBlockLike::CssFontFeatureValuesBlock(block) => block.l_curly_token(), + CssBlockLike::CssPageAtRuleBlock(block) => block.l_curly_token(), + CssBlockLike::CssDeclarationOrRuleBlock(block) => block.l_curly_token(), + } + } + + pub fn r_curly_token(&self) -> SyntaxResult { + match self { + CssBlockLike::CssKeyframesBlock(block) => block.r_curly_token(), + CssBlockLike::CssDeclarationOrAtRuleBlock(block) => block.r_curly_token(), + CssBlockLike::CssDeclarationBlock(block) => block.r_curly_token(), + CssBlockLike::CssRuleBlock(block) => block.r_curly_token(), + CssBlockLike::CssFontFeatureValuesBlock(block) => block.r_curly_token(), + CssBlockLike::CssPageAtRuleBlock(block) => block.r_curly_token(), + CssBlockLike::CssDeclarationOrRuleBlock(block) => block.r_curly_token(), + } + } + + pub fn is_empty(&self) -> bool { + match self { + CssBlockLike::CssKeyframesBlock(block) => block.items().is_empty(), + CssBlockLike::CssDeclarationOrAtRuleBlock(block) => block.items().is_empty(), + CssBlockLike::CssDeclarationBlock(block) => block.declarations().is_empty(), + CssBlockLike::CssRuleBlock(block) => block.rules().is_empty(), + CssBlockLike::CssFontFeatureValuesBlock(block) => block.items().is_empty(), + CssBlockLike::CssPageAtRuleBlock(block) => block.items().is_empty(), + CssBlockLike::CssDeclarationOrRuleBlock(block) => block.items().is_empty(), + } + } +} From 117820bf4caa8eecf03e8c4b03152568128ce799 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Thu, 18 Apr 2024 22:20:15 +0900 Subject: [PATCH 09/15] chore: update snapshots --- .../nursery/noCssEmptyBlock/invalid.css.snap | 329 +++++++++++++++--- .../noCssEmptyBlock/invalidComment.css.snap | 4 +- .../nursery/noCssEmptyBlock/valid.css.snap | 95 +++++ 3 files changed, 379 insertions(+), 49 deletions(-) diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap index 6cffb9a3b6e3..003a142343a3 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap @@ -4,6 +4,7 @@ expression: invalid.css --- # Input ```css +/* CssDeclarationOrRuleBlock */ a {} a { } a { @@ -16,128 +17,362 @@ a { } +/* CssRuleBlock */ @media print {} @media print { } @media print { a {} } + +/* CssDeclarationBlock */ +@font-palette-values --ident {} +@font-face {} + +/* CssKeyframesBlock */ +@keyframes slidein {} +@keyframes slidein { + from { + } + + to { + transform: translateX(100%); + } + } + +/* CssFontFeatureValuesBlock */ +@font-feature-values Font One { + @styleset { + + } +} + +/* CssPageAtRuleBlock */ +@page {} +@page :right { +} + + +/* CssDeclarationOrAtRuleBlock */ +@page :left { @left-middle {} background: red; } +@page { + @top-right { + + } +} ``` # Diagnostics ``` -invalid.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - > 1 │ a {} + 1 │ /* CssDeclarationOrRuleBlock */ + > 2 │ a {} │ ^^ - 2 │ a { } - 3 │ a { + 3 │ a { } + 4 │ a { - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` ``` -invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 1 │ a {} - > 2 │ a { } + 1 │ /* CssDeclarationOrRuleBlock */ + 2 │ a {} + > 3 │ a { } │ ^^^ - 3 │ a { - 4 │ + 4 │ a { + 5 │ - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` ``` -invalid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:4:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 1 │ a {} - 2 │ a { } - > 3 │ a { + 2 │ a {} + 3 │ a { } + > 4 │ a { │ ^ - > 4 │ - > 5 │ } + > 5 │ + > 6 │ } │ ^ - 6 │ - 7 │ .b {} + 7 │ + 8 │ .b {} - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` ``` -invalid.css:7:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:8:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 5 │ } - 6 │ - > 7 │ .b {} - │ ^^ - 8 │ .b { } - 9 │ .b { + 6 │ } + 7 │ + > 8 │ .b {} + │ ^^ + 9 │ .b { } + 10 │ .b { - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` ``` -invalid.css:8:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:9:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 7 │ .b {} - > 8 │ .b { } + 8 │ .b {} + > 9 │ .b { } │ ^^^ - 9 │ .b { - 10 │ + 10 │ .b { + 11 │ - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` ``` -invalid.css:9:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:10:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 7 │ .b {} - 8 │ .b { } - > 9 │ .b { + 8 │ .b {} + 9 │ .b { } + > 10 │ .b { │ ^ - > 10 │ - > 11 │ } + > 11 │ + > 12 │ } │ ^ - 12 │ - 13 │ @media print {} + 13 │ + 14 │ /* CssRuleBlock */ - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` ``` -invalid.css:17:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.css:15:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected empty block is not allowed - 16 │ } - > 17 │ @media print { a {} } + 14 │ /* CssRuleBlock */ + > 15 │ @media print {} + │ ^^ + 16 │ @media print { + 17 │ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:16:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 14 │ /* CssRuleBlock */ + 15 │ @media print {} + > 16 │ @media print { + │ ^ + > 17 │ + > 18 │ } + │ ^ + 19 │ @media print { a {} } + 20 │ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:19:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 18 │ } + > 19 │ @media print { a {} } │ ^^ + 20 │ + 21 │ /* CssDeclarationBlock */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:22:30 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 21 │ /* CssDeclarationBlock */ + > 22 │ @font-palette-values --ident {} + │ ^^ + 23 │ @font-face {} + 24 │ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:23:12 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 21 │ /* CssDeclarationBlock */ + 22 │ @font-palette-values --ident {} + > 23 │ @font-face {} + │ ^^ + 24 │ + 25 │ /* CssKeyframesBlock */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:26:20 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 25 │ /* CssKeyframesBlock */ + > 26 │ @keyframes slidein {} + │ ^^ + 27 │ @keyframes slidein { + 28 │ from { + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:28:10 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 26 │ @keyframes slidein {} + 27 │ @keyframes slidein { + > 28 │ from { + │ ^ + > 29 │ } + │ ^ + 30 │ + 31 │ to { + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:38:13 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 36 │ /* CssFontFeatureValuesBlock */ + 37 │ @font-feature-values Font One { + > 38 │ @styleset { + │ ^ + > 39 │ + > 40 │ } + │ ^ + 41 │ } + 42 │ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:44:7 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 43 │ /* CssPageAtRuleBlock */ + > 44 │ @page {} + │ ^^ + 45 │ @page :right { + 46 │ } + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:45:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 43 │ /* CssPageAtRuleBlock */ + 44 │ @page {} + > 45 │ @page :right { + │ ^ + > 46 │ } + │ ^ + 47 │ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:50:28 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 49 │ /* CssDeclarationOrAtRuleBlock */ + > 50 │ @page :left { @left-middle {} background: red; } + │ ^^ + 51 │ @page { + 52 │ @top-right { + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +invalid.css:52:16 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 50 │ @page :left { @left-middle {} background: red; } + 51 │ @page { + > 52 │ @top-right { + │ ^ + > 53 │ + > 54 │ } + │ ^ + 55 │ } - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap index d70767b106af..74eda153c4ea 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap @@ -21,7 +21,7 @@ invalidComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━ 2 │ a { 3 │ /* foo */ - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` @@ -38,7 +38,7 @@ invalidComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━ > 4 │ } │ ^ - i This note will give you more information. + i Consider removing the empty block or adding styles inside it. ``` diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap index f4ef2ee9eee4..7d024d1f5862 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap @@ -21,3 +21,98 @@ a { @media print { a { /* foo */ } } @import url(x.css) ``` + +# Diagnostics +``` +valid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 1 │ @import "foo.css"; + 2 │ a { color: pink; } + > 3 │ a { /* foo */ } + │ ^^^^^^^^^^^^^ + 4 │ a { + 5 │ /* foo */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +valid.css:4:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 2 │ a { color: pink; } + 3 │ a { /* foo */ } + > 4 │ a { + │ ^ + > 5 │ /* foo */ + > 6 │ } + │ ^ + 7 │ a { + 8 │ /* foo */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +valid.css:7:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 5 │ /* foo */ + 6 │ } + > 7 │ a { + │ ^ + > 8 │ /* foo */ + > 9 │ /* bar */ + > 10 │ } + │ ^ + 11 │ a { + 12 │ /*\nfoo\nbar\n*/ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +valid.css:11:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 9 │ /* bar */ + 10 │ } + > 11 │ a { + │ ^ + > 12 │ /*\nfoo\nbar\n*/ + > 13 │ } + │ ^ + 14 │ @media print { a { color: pink; } } + 15 │ @media print { a { /* foo */ } } + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +valid.css:15:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 13 │ } + 14 │ @media print { a { color: pink; } } + > 15 │ @media print { a { /* foo */ } } + │ ^^^^^^^^^^^^^ + 16 │ @import url(x.css) + + i Consider removing the empty block or adding styles inside it. + + +``` From b22b49fd28b171b01360da2bd31d68de63c6f37c Mon Sep 17 00:00:00 2001 From: togami2864 Date: Thu, 18 Apr 2024 22:26:26 +0900 Subject: [PATCH 10/15] feat: update valid snapshots --- .../src/lint/nursery/no_css_empty_block.rs | 2 +- .../specs/nursery/noCssEmptyBlock/valid.css | 56 +++++++- .../nursery/noCssEmptyBlock/valid.css.snap | 135 ++++++------------ 3 files changed, 103 insertions(+), 90 deletions(-) diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 908de53ee12d..812a5770d066 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -63,7 +63,7 @@ impl Rule for NoCssEmptyBlock { } } else if node.is_empty() { let has_comments_inside_block = node.r_curly_token().ok()?.has_leading_comments() - && node.l_curly_token().ok()?.has_trailing_comments(); + || node.l_curly_token().ok()?.has_trailing_comments(); if has_comments_inside_block { return None; diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css index 8e0621e5ff78..9660bfd99182 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css @@ -1,4 +1,4 @@ -@import "foo.css"; +/* CssDeclarationOrRuleBlock */ a { color: pink; } a { /* foo */ } a { @@ -11,6 +11,60 @@ a { a { /*\nfoo\nbar\n*/ } + +/* CssRuleBlock */ @media print { a { color: pink; } } @media print { a { /* foo */ } } + +/* CssDeclarationBlock */ +@font-palette-values --identifier { + font-family: Bixa; +} + +@font-face { + font-family: "Trickster"; + src: + local("Trickster"), + url("trickster-COLRv1.otf") format("opentype") tech(color-COLRv1), + url("trickster-outline.otf") format("opentype"), + url("trickster-outline.woff") format("woff"); +} + +/* CssKeyframesBlock */ +@keyframes slidein { + from { + transform: translateX(0%); + } + + to { + transform: translateX(100%); + } +} + +/* CssFontFeatureValuesBlock */ +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} + +/* CssPageAtRuleBlock */ +@page { + size: 8.5in 9in; + margin-top: 4in; +} +@page :right { + size: 11in; + margin-top: 4in; +} + + +/* CssDeclarationOrAtRuleBlock */ +@page { + @top-right { + content: "Page " counter(pageNumber); + } +} + +@import "foo.css"; @import url(x.css) \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap index 7d024d1f5862..8ebfac1bab70 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/valid.css.snap @@ -4,7 +4,7 @@ expression: valid.css --- # Input ```css -@import "foo.css"; +/* CssDeclarationOrRuleBlock */ a { color: pink; } a { /* foo */ } a { @@ -17,102 +17,61 @@ a { a { /*\nfoo\nbar\n*/ } + +/* CssRuleBlock */ @media print { a { color: pink; } } @media print { a { /* foo */ } } -@import url(x.css) -``` - -# Diagnostics -``` -valid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - ! Unexpected empty block is not allowed - - 1 │ @import "foo.css"; - 2 │ a { color: pink; } - > 3 │ a { /* foo */ } - │ ^^^^^^^^^^^^^ - 4 │ a { - 5 │ /* foo */ - - i Consider removing the empty block or adding styles inside it. - - -``` - -``` -valid.css:4:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - ! Unexpected empty block is not allowed - - 2 │ a { color: pink; } - 3 │ a { /* foo */ } - > 4 │ a { - │ ^ - > 5 │ /* foo */ - > 6 │ } - │ ^ - 7 │ a { - 8 │ /* foo */ - - i Consider removing the empty block or adding styles inside it. - - -``` -``` -valid.css:7:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +/* CssDeclarationBlock */ +@font-palette-values --identifier { + font-family: Bixa; +} - ! Unexpected empty block is not allowed - - 5 │ /* foo */ - 6 │ } - > 7 │ a { - │ ^ - > 8 │ /* foo */ - > 9 │ /* bar */ - > 10 │ } - │ ^ - 11 │ a { - 12 │ /*\nfoo\nbar\n*/ - - i Consider removing the empty block or adding styles inside it. - +@font-face { + font-family: "Trickster"; + src: + local("Trickster"), + url("trickster-COLRv1.otf") format("opentype") tech(color-COLRv1), + url("trickster-outline.otf") format("opentype"), + url("trickster-outline.woff") format("woff"); +} -``` +/* CssKeyframesBlock */ +@keyframes slidein { + from { + transform: translateX(0%); + } -``` -valid.css:11:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + to { + transform: translateX(100%); + } +} - ! Unexpected empty block is not allowed - - 9 │ /* bar */ - 10 │ } - > 11 │ a { - │ ^ - > 12 │ /*\nfoo\nbar\n*/ - > 13 │ } - │ ^ - 14 │ @media print { a { color: pink; } } - 15 │ @media print { a { /* foo */ } } - - i Consider removing the empty block or adding styles inside it. - +/* CssFontFeatureValuesBlock */ +@font-feature-values Font One { + @styleset { + nice-style: 12; + } +} -``` +/* CssPageAtRuleBlock */ +@page { + size: 8.5in 9in; + margin-top: 4in; +} +@page :right { + size: 11in; + margin-top: 4in; +} -``` -valid.css:15:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed - - 13 │ } - 14 │ @media print { a { color: pink; } } - > 15 │ @media print { a { /* foo */ } } - │ ^^^^^^^^^^^^^ - 16 │ @import url(x.css) - - i Consider removing the empty block or adding styles inside it. - +/* CssDeclarationOrAtRuleBlock */ +@page { + @top-right { + content: "Page " counter(pageNumber); + } +} +@import "foo.css"; +@import url(x.css) ``` From 1b71719833cf7c59a5a49683fe9b311acc9fbb57 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Thu, 18 Apr 2024 22:56:23 +0900 Subject: [PATCH 11/15] chore: snapshot with options --- .../biome_configuration/src/linter/rules.rs | 33 +- .../src/lint/nursery/no_css_empty_block.rs | 46 +- .../noCssEmptyBlock/disallowComment.css | 19 + .../noCssEmptyBlock/disallowComment.css.snap | 152 ++ ...ions.json => disallowComment.options.json} | 0 .../noCssEmptyBlock/invalidComment.css | 4 - .../noCssEmptyBlock/invalidComment.css.snap | 44 - .../@biomejs/backend-jsonrpc/src/workspace.ts | 2 +- .../@biomejs/biome/configuration_schema.json | 2 +- website/.astro/types.d.ts | 2367 ----------------- 10 files changed, 228 insertions(+), 2441 deletions(-) create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css create mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap rename crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/{invalidComment.options.json => disallowComment.options.json} (100%) delete mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css delete mode 100644 crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap delete mode 100644 website/.astro/types.d.ts diff --git a/crates/biome_configuration/src/linter/rules.rs b/crates/biome_configuration/src/linter/rules.rs index 1900734ce2b7..c755ba06a0c3 100644 --- a/crates/biome_configuration/src/linter/rules.rs +++ b/crates/biome_configuration/src/linter/rules.rs @@ -2656,7 +2656,7 @@ pub struct Nursery { #[doc = "Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant."] #[serde(skip_serializing_if = "Option::is_none")] pub no_constant_math_min_max_clamp: Option>, - #[doc = "Succinct description of the rule."] + #[doc = "Disallow css empty blocks."] #[serde(skip_serializing_if = "Option::is_none")] pub no_css_empty_block: Option>, #[doc = "Disallow using a callback in asynchronous tests and hooks."] @@ -2769,6 +2769,7 @@ impl Nursery { RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14]), RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15]), + RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16]), ]; #[doc = r" Retrieves the recommended rules"] pub(crate) fn is_recommended_true(&self) -> bool { @@ -2840,35 +2841,36 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[10])); } } -<<<<<<< HEAD - if let Some(rule) = self.no_react_specific_props.as_ref() { -======= if let Some(rule) = self.no_nodejs_modules.as_ref() { ->>>>>>> 51963430b5 (chore: rebase) if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.no_restricted_imports.as_ref() { + if let Some(rule) = self.no_react_specific_props.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } - if let Some(rule) = self.no_undeclared_dependencies.as_ref() { + if let Some(rule) = self.no_restricted_imports.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); } } - if let Some(rule) = self.use_import_restrictions.as_ref() { + if let Some(rule) = self.no_undeclared_dependencies.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); } } - if let Some(rule) = self.use_sorted_classes.as_ref() { + if let Some(rule) = self.use_import_restrictions.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); } } + if let Some(rule) = self.use_sorted_classes.as_ref() { + if rule.is_enabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); + } + } index_set } pub(crate) fn get_disabled_rules(&self) -> IndexSet { @@ -2933,26 +2935,31 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[11])); } } - if let Some(rule) = self.no_restricted_imports.as_ref() { + if let Some(rule) = self.no_react_specific_props.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[12])); } } - if let Some(rule) = self.no_undeclared_dependencies.as_ref() { + if let Some(rule) = self.no_restricted_imports.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[13])); } } - if let Some(rule) = self.use_import_restrictions.as_ref() { + if let Some(rule) = self.no_undeclared_dependencies.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[14])); } } - if let Some(rule) = self.use_sorted_classes.as_ref() { + if let Some(rule) = self.use_import_restrictions.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[15])); } } + if let Some(rule) = self.use_sorted_classes.as_ref() { + if rule.is_disabled() { + index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[16])); + } + } index_set } #[doc = r" Checks if, given a rule name, matches one of the rules contained in this category"] diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 812a5770d066..f4fc15e02dca 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -6,14 +6,10 @@ use biome_rowan::AstNode; use serde::{Deserialize, Serialize}; declare_rule! { - /// Succinct description of the rule. + /// Disallow css empty blocks. /// - /// Put context and details about the rule. - /// As a starting point, you can take the description of the corresponding _ESLint_ rule (if any). - /// - /// Try to stay consistent with the descriptions of implemented rules. - /// - /// Add a link to the corresponding stylelint rule (if any): + /// This rule disallows empty block. + /// By default, it will allow empty blocks with comments inside. /// /// ## Examples /// @@ -23,6 +19,14 @@ declare_rule! { /// p {} /// ``` /// + /// ```css,expect_diagnostic + /// .b {} + /// ``` + /// + /// ```css,expect_diagnostic + /// @media print { a {} } + /// ``` + /// /// ### Valid /// /// ```css @@ -31,6 +35,30 @@ declare_rule! { /// } /// ``` /// + /// ```css + /// p { + /// /* foo */ + /// } + /// ``` + /// + /// ```css + /// @media print { a { color: pink; } } + /// ``` + /// + /// ## Options + /// + /// Exclude comments from being treated as content inside of a block. + /// + /// ```json + /// { + /// "noCssEmptyBlock": { + /// "options": { + /// "ignore": ["comments"] + /// } + /// } + /// } + /// ``` + /// pub NoCssEmptyBlock { version: "next", name: "noCssEmptyBlock", @@ -76,10 +104,6 @@ impl Rule for NoCssEmptyBlock { } fn diagnostic(_: &RuleContext, node: &Self::State) -> Option { - // - // Read our guidelines to write great diagnostics: - // https://docs.rs/biome_analyze/latest/biome_analyze/#what-a-rule-should-say-to-the-user - // let span = node.range(); Some( RuleDiagnostic::new( diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css new file mode 100644 index 000000000000..5715183c5e0f --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css @@ -0,0 +1,19 @@ +a { /* foo */ } +a { + /* foo */ +} + +.b { /* foo */ } +.b { + /* foo */ +} + +@media print { /* foo */ } +@media print { + /* foo */ +} +@media print { + a { + /* foo */ + } +} \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap new file mode 100644 index 000000000000..ca7b2591a7d6 --- /dev/null +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap @@ -0,0 +1,152 @@ +--- +source: crates/biome_css_analyze/tests/spec_tests.rs +expression: disallowComment.css +--- +# Input +```css +a { /* foo */ } +a { + /* foo */ +} + +.b { /* foo */ } +.b { + /* foo */ +} + +@media print { /* foo */ } +@media print { + /* foo */ +} +@media print { + a { + /* foo */ + } +} +``` + +# Diagnostics +``` +disallowComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + > 1 │ a { /* foo */ } + │ ^^^^^^^^^^^^^ + 2 │ a { + 3 │ /* foo */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +disallowComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 1 │ a { /* foo */ } + > 2 │ a { + │ ^ + > 3 │ /* foo */ + > 4 │ } + │ ^ + 5 │ + 6 │ .b { /* foo */ } + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +disallowComment.css:6:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 4 │ } + 5 │ + > 6 │ .b { /* foo */ } + │ ^^^^^^^^^^^^^ + 7 │ .b { + 8 │ /* foo */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +disallowComment.css:7:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 6 │ .b { /* foo */ } + > 7 │ .b { + │ ^ + > 8 │ /* foo */ + > 9 │ } + │ ^ + 10 │ + 11 │ @media print { /* foo */ } + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +disallowComment.css:11:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 9 │ } + 10 │ + > 11 │ @media print { /* foo */ } + │ ^^^^^^^^^^^^^ + 12 │ @media print { + 13 │ /* foo */ + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +disallowComment.css:12:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 11 │ @media print { /* foo */ } + > 12 │ @media print { + │ ^ + > 13 │ /* foo */ + > 14 │ } + │ ^ + 15 │ @media print { + 16 │ a { + + i Consider removing the empty block or adding styles inside it. + + +``` + +``` +disallowComment.css:16:5 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Unexpected empty block is not allowed + + 14 │ } + 15 │ @media print { + > 16 │ a { + │ ^ + > 17 │ /* foo */ + > 18 │ } + │ ^ + 19 │ } + + i Consider removing the empty block or adding styles inside it. + + +``` diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.options.json b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.options.json similarity index 100% rename from crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.options.json rename to crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.options.json diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css deleted file mode 100644 index 03c6fb89b13b..000000000000 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css +++ /dev/null @@ -1,4 +0,0 @@ -a { /* foo */ } -a { - /* foo */ -} \ No newline at end of file diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap deleted file mode 100644 index 74eda153c4ea..000000000000 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalidComment.css.snap +++ /dev/null @@ -1,44 +0,0 @@ ---- -source: crates/biome_css_analyze/tests/spec_tests.rs -expression: invalidComment.css ---- -# Input -```css -a { /* foo */ } -a { - /* foo */ -} -``` - -# Diagnostics -``` -invalidComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - ! Unexpected empty block is not allowed - - > 1 │ a { /* foo */ } - │ ^^^^^^^^^^^^^ - 2 │ a { - 3 │ /* foo */ - - i Consider removing the empty block or adding styles inside it. - - -``` - -``` -invalidComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - - ! Unexpected empty block is not allowed - - 1 │ a { /* foo */ } - > 2 │ a { - │ ^ - > 3 │ /* foo */ - > 4 │ } - │ ^ - - i Consider removing the empty block or adding styles inside it. - - -``` diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index 75dbff5a1716..4bb10e5688d5 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -921,7 +921,7 @@ export interface Nursery { */ noConstantMathMinMaxClamp?: RuleConfiguration_for_Null; /** - * Succinct description of the rule. + * Disallow css empty blocks. */ noCssEmptyBlock?: RuleConfiguration_for_NoCssEmptyBlockOptions; /** diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index de64d638d00b..db82b08b2d38 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -1457,7 +1457,7 @@ ] }, "noCssEmptyBlock": { - "description": "Succinct description of the rule.", + "description": "Disallow css empty blocks.", "anyOf": [ { "$ref": "#/definitions/NoCssEmptyBlockConfiguration" }, { "type": "null" } diff --git a/website/.astro/types.d.ts b/website/.astro/types.d.ts deleted file mode 100644 index d0af52874093..000000000000 --- a/website/.astro/types.d.ts +++ /dev/null @@ -1,2367 +0,0 @@ -declare module 'astro:content' { - interface Render { - '.mdx': Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - }>; - } -} - -declare module 'astro:content' { - interface Render { - '.md': Promise<{ - Content: import('astro').MarkdownInstance<{}>['Content']; - headings: import('astro').MarkdownHeading[]; - remarkPluginFrontmatter: Record; - }>; - } -} - -declare module 'astro:content' { - type Flatten = T extends { [K: string]: infer U } ? U : never; - - export type CollectionKey = keyof AnyEntryMap; - export type CollectionEntry = Flatten; - - export type ContentCollectionKey = keyof ContentEntryMap; - export type DataCollectionKey = keyof DataEntryMap; - - type AllValuesOf = T extends any ? T[keyof T] : never; - type ValidContentEntrySlug = AllValuesOf< - ContentEntryMap[C] - >['slug']; - - export function getEntryBySlug< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - // Note that this has to accept a regular string too, for SSR - entrySlug: E - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - - export function getDataEntryById( - collection: C, - entryId: E - ): Promise>; - - export function getCollection>( - collection: C, - filter?: (entry: CollectionEntry) => entry is E - ): Promise; - export function getCollection( - collection: C, - filter?: (entry: CollectionEntry) => unknown - ): Promise[]>; - - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >(entry: { - collection: C; - slug: E; - }): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >(entry: { - collection: C; - id: E; - }): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - export function getEntry< - C extends keyof ContentEntryMap, - E extends ValidContentEntrySlug | (string & {}), - >( - collection: C, - slug: E - ): E extends ValidContentEntrySlug - ? Promise> - : Promise | undefined>; - export function getEntry< - C extends keyof DataEntryMap, - E extends keyof DataEntryMap[C] | (string & {}), - >( - collection: C, - id: E - ): E extends keyof DataEntryMap[C] - ? Promise - : Promise | undefined>; - - /** Resolve an array of entry references from the same collection */ - export function getEntries( - entries: { - collection: C; - slug: ValidContentEntrySlug; - }[] - ): Promise[]>; - export function getEntries( - entries: { - collection: C; - id: keyof DataEntryMap[C]; - }[] - ): Promise[]>; - - export function reference( - collection: C - ): import('astro/zod').ZodEffects< - import('astro/zod').ZodString, - C extends keyof ContentEntryMap - ? { - collection: C; - slug: ValidContentEntrySlug; - } - : { - collection: C; - id: keyof DataEntryMap[C]; - } - >; - // Allow generic `string` to avoid excessive type errors in the config - // if `dev` is not running to update as you edit. - // Invalid collection names will be caught at build time. - export function reference( - collection: C - ): import('astro/zod').ZodEffects; - - type ReturnTypeOrOriginal = T extends (...args: any[]) => infer R ? R : T; - type InferEntrySchema = import('astro/zod').infer< - ReturnTypeOrOriginal['schema']> - >; - - type ContentEntryMap = { - "blog": { -"annoucing-biome.mdx": { - id: "annoucing-biome.mdx"; - slug: "annoucing-biome"; - body: string; - collection: "blog"; - data: InferEntrySchema<"blog"> -} & { render(): Render[".mdx"] }; -"biome-v1-5.md": { - id: "biome-v1-5.md"; - slug: "biome-v1-5"; - body: string; - collection: "blog"; - data: InferEntrySchema<"blog"> -} & { render(): Render[".md"] }; -"biome-v1-6.mdx": { - id: "biome-v1-6.mdx"; - slug: "biome-v1-6"; - body: string; - collection: "blog"; - data: InferEntrySchema<"blog"> -} & { render(): Render[".mdx"] }; -"biome-v1.mdx": { - id: "biome-v1.mdx"; - slug: "biome-v1"; - body: string; - collection: "blog"; - data: InferEntrySchema<"blog"> -} & { render(): Render[".mdx"] }; -"biome-wins-prettier-challenge.md": { - id: "biome-wins-prettier-challenge.md"; - slug: "biome-wins-prettier-challenge"; - body: string; - collection: "blog"; - data: InferEntrySchema<"blog"> -} & { render(): Render[".md"] }; -"roadmap-2024.md": { - id: "roadmap-2024.md"; - slug: "roadmap-2024"; - body: string; - collection: "blog"; - data: InferEntrySchema<"blog"> -} & { render(): Render[".md"] }; -}; -"docs": { -"404.md": { - id: "404.md"; - slug: "404"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"analyzer/import-sorting.mdx": { - id: "analyzer/import-sorting.mdx"; - slug: "analyzer/import-sorting"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"analyzer/index.mdx": { - id: "analyzer/index.mdx"; - slug: "analyzer"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"formatter/differences-with-prettier.md": { - id: "formatter/differences-with-prettier.md"; - slug: "formatter/differences-with-prettier"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"formatter/index.mdx": { - id: "formatter/index.mdx"; - slug: "formatter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"formatter/option-philosophy.md": { - id: "formatter/option-philosophy.md"; - slug: "formatter/option-philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"guides/big-projects.mdx": { - id: "guides/big-projects.mdx"; - slug: "guides/big-projects"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"guides/getting-started.mdx": { - id: "guides/getting-started.mdx"; - slug: "guides/getting-started"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"guides/how-biome-works.mdx": { - id: "guides/how-biome-works.mdx"; - slug: "guides/how-biome-works"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"guides/integrate-in-editor.mdx": { - id: "guides/integrate-in-editor.mdx"; - slug: "guides/integrate-in-editor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"guides/integrate-in-vcs.mdx": { - id: "guides/integrate-in-vcs.mdx"; - slug: "guides/integrate-in-vcs"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"guides/manual-installation.mdx": { - id: "guides/manual-installation.mdx"; - slug: "guides/manual-installation"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"index.mdx": { - id: "index.mdx"; - slug: "index"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"internals/architecture.mdx": { - id: "internals/architecture.mdx"; - slug: "internals/architecture"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"internals/changelog.md": { - id: "internals/changelog.md"; - slug: "internals/changelog"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"internals/credits.mdx": { - id: "internals/credits.mdx"; - slug: "internals/credits"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"internals/language-support.mdx": { - id: "internals/language-support.mdx"; - slug: "internals/language-support"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"internals/philosophy.mdx": { - id: "internals/philosophy.mdx"; - slug: "internals/philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"internals/versioning.mdx": { - id: "internals/versioning.mdx"; - slug: "internals/versioning"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/404.md": { - id: "ja/404.md"; - slug: "ja/404"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"ja/analyzer/import-sorting.mdx": { - id: "ja/analyzer/import-sorting.mdx"; - slug: "ja/analyzer/import-sorting"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/analyzer/index.mdx": { - id: "ja/analyzer/index.mdx"; - slug: "ja/analyzer"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/formatter/differences-with-prettier.md": { - id: "ja/formatter/differences-with-prettier.md"; - slug: "ja/formatter/differences-with-prettier"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"ja/formatter/index.mdx": { - id: "ja/formatter/index.mdx"; - slug: "ja/formatter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/formatter/option-philosophy.md": { - id: "ja/formatter/option-philosophy.md"; - slug: "ja/formatter/option-philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"ja/guides/big-projects.mdx": { - id: "ja/guides/big-projects.mdx"; - slug: "ja/guides/big-projects"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/guides/getting-started.mdx": { - id: "ja/guides/getting-started.mdx"; - slug: "ja/guides/getting-started"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/guides/how-biome-works.mdx": { - id: "ja/guides/how-biome-works.mdx"; - slug: "ja/guides/how-biome-works"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/guides/integrate-in-editor.mdx": { - id: "ja/guides/integrate-in-editor.mdx"; - slug: "ja/guides/integrate-in-editor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/guides/integrate-in-vcs.mdx": { - id: "ja/guides/integrate-in-vcs.mdx"; - slug: "ja/guides/integrate-in-vcs"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/guides/manual-installation.mdx": { - id: "ja/guides/manual-installation.mdx"; - slug: "ja/guides/manual-installation"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/index.mdx": { - id: "ja/index.mdx"; - slug: "ja"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/internals/architecture.mdx": { - id: "ja/internals/architecture.mdx"; - slug: "ja/internals/architecture"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/internals/credits.mdx": { - id: "ja/internals/credits.mdx"; - slug: "ja/internals/credits"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/internals/language-support.mdx": { - id: "ja/internals/language-support.mdx"; - slug: "ja/internals/language-support"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/internals/philosophy.mdx": { - id: "ja/internals/philosophy.mdx"; - slug: "ja/internals/philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/internals/versioning.mdx": { - id: "ja/internals/versioning.mdx"; - slug: "ja/internals/versioning"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/linter/index.mdx": { - id: "ja/linter/index.mdx"; - slug: "ja/linter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/recipes/continuous-integration.mdx": { - id: "ja/recipes/continuous-integration.mdx"; - slug: "ja/recipes/continuous-integration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/recipes/git-hooks.mdx": { - id: "ja/recipes/git-hooks.mdx"; - slug: "ja/recipes/git-hooks"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"ja/reference/vscode.mdx": { - id: "ja/reference/vscode.mdx"; - slug: "ja/reference/vscode"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"linter/index.mdx": { - id: "linter/index.mdx"; - slug: "linter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"linter/rules-sources.mdx": { - id: "linter/rules-sources.mdx"; - slug: "linter/rules-sources"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"linter/rules/index.mdx": { - id: "linter/rules/index.mdx"; - slug: "linter/rules"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"linter/rules/no-access-key.md": { - id: "linter/rules/no-access-key.md"; - slug: "linter/rules/no-access-key"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-accumulating-spread.md": { - id: "linter/rules/no-accumulating-spread.md"; - slug: "linter/rules/no-accumulating-spread"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-approximative-numeric-constant.md": { - id: "linter/rules/no-approximative-numeric-constant.md"; - slug: "linter/rules/no-approximative-numeric-constant"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-arguments.md": { - id: "linter/rules/no-arguments.md"; - slug: "linter/rules/no-arguments"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-aria-hidden-on-focusable.md": { - id: "linter/rules/no-aria-hidden-on-focusable.md"; - slug: "linter/rules/no-aria-hidden-on-focusable"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-aria-unsupported-elements.md": { - id: "linter/rules/no-aria-unsupported-elements.md"; - slug: "linter/rules/no-aria-unsupported-elements"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-array-index-key.md": { - id: "linter/rules/no-array-index-key.md"; - slug: "linter/rules/no-array-index-key"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-assign-in-expressions.md": { - id: "linter/rules/no-assign-in-expressions.md"; - slug: "linter/rules/no-assign-in-expressions"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-async-promise-executor.md": { - id: "linter/rules/no-async-promise-executor.md"; - slug: "linter/rules/no-async-promise-executor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-autofocus.md": { - id: "linter/rules/no-autofocus.md"; - slug: "linter/rules/no-autofocus"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-banned-types.md": { - id: "linter/rules/no-banned-types.md"; - slug: "linter/rules/no-banned-types"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-barrel-file.md": { - id: "linter/rules/no-barrel-file.md"; - slug: "linter/rules/no-barrel-file"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-blank-target.md": { - id: "linter/rules/no-blank-target.md"; - slug: "linter/rules/no-blank-target"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-catch-assign.md": { - id: "linter/rules/no-catch-assign.md"; - slug: "linter/rules/no-catch-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-children-prop.md": { - id: "linter/rules/no-children-prop.md"; - slug: "linter/rules/no-children-prop"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-class-assign.md": { - id: "linter/rules/no-class-assign.md"; - slug: "linter/rules/no-class-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-color-invalid-hex.md": { - id: "linter/rules/no-color-invalid-hex.md"; - slug: "linter/rules/no-color-invalid-hex"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-comma-operator.md": { - id: "linter/rules/no-comma-operator.md"; - slug: "linter/rules/no-comma-operator"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-comment-text.md": { - id: "linter/rules/no-comment-text.md"; - slug: "linter/rules/no-comment-text"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-compare-neg-zero.md": { - id: "linter/rules/no-compare-neg-zero.md"; - slug: "linter/rules/no-compare-neg-zero"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-confusing-labels.md": { - id: "linter/rules/no-confusing-labels.md"; - slug: "linter/rules/no-confusing-labels"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-confusing-void-type.md": { - id: "linter/rules/no-confusing-void-type.md"; - slug: "linter/rules/no-confusing-void-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-console-log.md": { - id: "linter/rules/no-console-log.md"; - slug: "linter/rules/no-console-log"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-console.md": { - id: "linter/rules/no-console.md"; - slug: "linter/rules/no-console"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-const-assign.md": { - id: "linter/rules/no-const-assign.md"; - slug: "linter/rules/no-const-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-const-enum.md": { - id: "linter/rules/no-const-enum.md"; - slug: "linter/rules/no-const-enum"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-constant-condition.md": { - id: "linter/rules/no-constant-condition.md"; - slug: "linter/rules/no-constant-condition"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-constructor-return.md": { - id: "linter/rules/no-constructor-return.md"; - slug: "linter/rules/no-constructor-return"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-control-characters-in-regex.md": { - id: "linter/rules/no-control-characters-in-regex.md"; - slug: "linter/rules/no-control-characters-in-regex"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-dangerously-set-inner-html-with-children.md": { - id: "linter/rules/no-dangerously-set-inner-html-with-children.md"; - slug: "linter/rules/no-dangerously-set-inner-html-with-children"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-dangerously-set-inner-html.md": { - id: "linter/rules/no-dangerously-set-inner-html.md"; - slug: "linter/rules/no-dangerously-set-inner-html"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-debugger.md": { - id: "linter/rules/no-debugger.md"; - slug: "linter/rules/no-debugger"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-default-export.md": { - id: "linter/rules/no-default-export.md"; - slug: "linter/rules/no-default-export"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-delete.md": { - id: "linter/rules/no-delete.md"; - slug: "linter/rules/no-delete"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-distracting-elements.md": { - id: "linter/rules/no-distracting-elements.md"; - slug: "linter/rules/no-distracting-elements"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-done-callback.md": { - id: "linter/rules/no-done-callback.md"; - slug: "linter/rules/no-done-callback"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-double-equals.md": { - id: "linter/rules/no-double-equals.md"; - slug: "linter/rules/no-double-equals"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-case.md": { - id: "linter/rules/no-duplicate-case.md"; - slug: "linter/rules/no-duplicate-case"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-class-members.md": { - id: "linter/rules/no-duplicate-class-members.md"; - slug: "linter/rules/no-duplicate-class-members"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-else-if.md": { - id: "linter/rules/no-duplicate-else-if.md"; - slug: "linter/rules/no-duplicate-else-if"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-font-names.md": { - id: "linter/rules/no-duplicate-font-names.md"; - slug: "linter/rules/no-duplicate-font-names"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-json-keys.md": { - id: "linter/rules/no-duplicate-json-keys.md"; - slug: "linter/rules/no-duplicate-json-keys"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-jsx-props.md": { - id: "linter/rules/no-duplicate-jsx-props.md"; - slug: "linter/rules/no-duplicate-jsx-props"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-object-keys.md": { - id: "linter/rules/no-duplicate-object-keys.md"; - slug: "linter/rules/no-duplicate-object-keys"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-parameters.md": { - id: "linter/rules/no-duplicate-parameters.md"; - slug: "linter/rules/no-duplicate-parameters"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-duplicate-test-hooks.md": { - id: "linter/rules/no-duplicate-test-hooks.md"; - slug: "linter/rules/no-duplicate-test-hooks"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-empty-block-statements.md": { - id: "linter/rules/no-empty-block-statements.md"; - slug: "linter/rules/no-empty-block-statements"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-empty-character-class-in-regex.md": { - id: "linter/rules/no-empty-character-class-in-regex.md"; - slug: "linter/rules/no-empty-character-class-in-regex"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-empty-interface.md": { - id: "linter/rules/no-empty-interface.md"; - slug: "linter/rules/no-empty-interface"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-empty-pattern.md": { - id: "linter/rules/no-empty-pattern.md"; - slug: "linter/rules/no-empty-pattern"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-empty-type-parameters.md": { - id: "linter/rules/no-empty-type-parameters.md"; - slug: "linter/rules/no-empty-type-parameters"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-evolving-any.md": { - id: "linter/rules/no-evolving-any.md"; - slug: "linter/rules/no-evolving-any"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-excessive-cognitive-complexity.md": { - id: "linter/rules/no-excessive-cognitive-complexity.md"; - slug: "linter/rules/no-excessive-cognitive-complexity"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-excessive-nested-test-suites.md": { - id: "linter/rules/no-excessive-nested-test-suites.md"; - slug: "linter/rules/no-excessive-nested-test-suites"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-explicit-any.md": { - id: "linter/rules/no-explicit-any.md"; - slug: "linter/rules/no-explicit-any"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-exports-in-test.md": { - id: "linter/rules/no-exports-in-test.md"; - slug: "linter/rules/no-exports-in-test"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-extra-boolean-cast.md": { - id: "linter/rules/no-extra-boolean-cast.md"; - slug: "linter/rules/no-extra-boolean-cast"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-extra-non-null-assertion.md": { - id: "linter/rules/no-extra-non-null-assertion.md"; - slug: "linter/rules/no-extra-non-null-assertion"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-fallthrough-switch-clause.md": { - id: "linter/rules/no-fallthrough-switch-clause.md"; - slug: "linter/rules/no-fallthrough-switch-clause"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-focused-tests.md": { - id: "linter/rules/no-focused-tests.md"; - slug: "linter/rules/no-focused-tests"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-for-each.md": { - id: "linter/rules/no-for-each.md"; - slug: "linter/rules/no-for-each"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-function-assign.md": { - id: "linter/rules/no-function-assign.md"; - slug: "linter/rules/no-function-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-global-assign.md": { - id: "linter/rules/no-global-assign.md"; - slug: "linter/rules/no-global-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-global-eval.md": { - id: "linter/rules/no-global-eval.md"; - slug: "linter/rules/no-global-eval"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-global-is-finite.md": { - id: "linter/rules/no-global-is-finite.md"; - slug: "linter/rules/no-global-is-finite"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-global-is-nan.md": { - id: "linter/rules/no-global-is-nan.md"; - slug: "linter/rules/no-global-is-nan"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-global-object-calls.md": { - id: "linter/rules/no-global-object-calls.md"; - slug: "linter/rules/no-global-object-calls"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-header-scope.md": { - id: "linter/rules/no-header-scope.md"; - slug: "linter/rules/no-header-scope"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-implicit-any-let.md": { - id: "linter/rules/no-implicit-any-let.md"; - slug: "linter/rules/no-implicit-any-let"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-implicit-boolean.md": { - id: "linter/rules/no-implicit-boolean.md"; - slug: "linter/rules/no-implicit-boolean"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-import-assign.md": { - id: "linter/rules/no-import-assign.md"; - slug: "linter/rules/no-import-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-inferrable-types.md": { - id: "linter/rules/no-inferrable-types.md"; - slug: "linter/rules/no-inferrable-types"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-inner-declarations.md": { - id: "linter/rules/no-inner-declarations.md"; - slug: "linter/rules/no-inner-declarations"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-interactive-element-to-noninteractive-role.md": { - id: "linter/rules/no-interactive-element-to-noninteractive-role.md"; - slug: "linter/rules/no-interactive-element-to-noninteractive-role"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-invalid-constructor-super.md": { - id: "linter/rules/no-invalid-constructor-super.md"; - slug: "linter/rules/no-invalid-constructor-super"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-invalid-new-builtin.md": { - id: "linter/rules/no-invalid-new-builtin.md"; - slug: "linter/rules/no-invalid-new-builtin"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-invalid-use-before-declaration.md": { - id: "linter/rules/no-invalid-use-before-declaration.md"; - slug: "linter/rules/no-invalid-use-before-declaration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-label-var.md": { - id: "linter/rules/no-label-var.md"; - slug: "linter/rules/no-label-var"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-misleading-character-class.md": { - id: "linter/rules/no-misleading-character-class.md"; - slug: "linter/rules/no-misleading-character-class"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-misleading-instantiator.md": { - id: "linter/rules/no-misleading-instantiator.md"; - slug: "linter/rules/no-misleading-instantiator"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-misplaced-assertion.md": { - id: "linter/rules/no-misplaced-assertion.md"; - slug: "linter/rules/no-misplaced-assertion"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-misrefactored-shorthand-assign.md": { - id: "linter/rules/no-misrefactored-shorthand-assign.md"; - slug: "linter/rules/no-misrefactored-shorthand-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-multiple-spaces-in-regular-expression-literals.md": { - id: "linter/rules/no-multiple-spaces-in-regular-expression-literals.md"; - slug: "linter/rules/no-multiple-spaces-in-regular-expression-literals"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-namespace-import.md": { - id: "linter/rules/no-namespace-import.md"; - slug: "linter/rules/no-namespace-import"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-namespace.md": { - id: "linter/rules/no-namespace.md"; - slug: "linter/rules/no-namespace"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-negation-else.md": { - id: "linter/rules/no-negation-else.md"; - slug: "linter/rules/no-negation-else"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-new-symbol.md": { - id: "linter/rules/no-new-symbol.md"; - slug: "linter/rules/no-new-symbol"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-nodejs-modules.md": { - id: "linter/rules/no-nodejs-modules.md"; - slug: "linter/rules/no-nodejs-modules"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-non-null-assertion.md": { - id: "linter/rules/no-non-null-assertion.md"; - slug: "linter/rules/no-non-null-assertion"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-noninteractive-element-to-interactive-role.md": { - id: "linter/rules/no-noninteractive-element-to-interactive-role.md"; - slug: "linter/rules/no-noninteractive-element-to-interactive-role"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-noninteractive-tabindex.md": { - id: "linter/rules/no-noninteractive-tabindex.md"; - slug: "linter/rules/no-noninteractive-tabindex"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-nonoctal-decimal-escape.md": { - id: "linter/rules/no-nonoctal-decimal-escape.md"; - slug: "linter/rules/no-nonoctal-decimal-escape"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-parameter-assign.md": { - id: "linter/rules/no-parameter-assign.md"; - slug: "linter/rules/no-parameter-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-parameter-properties.md": { - id: "linter/rules/no-parameter-properties.md"; - slug: "linter/rules/no-parameter-properties"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-positive-tabindex.md": { - id: "linter/rules/no-positive-tabindex.md"; - slug: "linter/rules/no-positive-tabindex"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-precision-loss.md": { - id: "linter/rules/no-precision-loss.md"; - slug: "linter/rules/no-precision-loss"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-prototype-builtins.md": { - id: "linter/rules/no-prototype-builtins.md"; - slug: "linter/rules/no-prototype-builtins"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-re-export-all.md": { - id: "linter/rules/no-re-export-all.md"; - slug: "linter/rules/no-re-export-all"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-redeclare.md": { - id: "linter/rules/no-redeclare.md"; - slug: "linter/rules/no-redeclare"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-redundant-alt.md": { - id: "linter/rules/no-redundant-alt.md"; - slug: "linter/rules/no-redundant-alt"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-redundant-roles.md": { - id: "linter/rules/no-redundant-roles.md"; - slug: "linter/rules/no-redundant-roles"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-redundant-use-strict.md": { - id: "linter/rules/no-redundant-use-strict.md"; - slug: "linter/rules/no-redundant-use-strict"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-render-return-value.md": { - id: "linter/rules/no-render-return-value.md"; - slug: "linter/rules/no-render-return-value"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-restricted-globals.md": { - id: "linter/rules/no-restricted-globals.md"; - slug: "linter/rules/no-restricted-globals"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-restricted-imports.md": { - id: "linter/rules/no-restricted-imports.md"; - slug: "linter/rules/no-restricted-imports"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-self-assign.md": { - id: "linter/rules/no-self-assign.md"; - slug: "linter/rules/no-self-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-self-compare.md": { - id: "linter/rules/no-self-compare.md"; - slug: "linter/rules/no-self-compare"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-setter-return.md": { - id: "linter/rules/no-setter-return.md"; - slug: "linter/rules/no-setter-return"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-shadow-restricted-names.md": { - id: "linter/rules/no-shadow-restricted-names.md"; - slug: "linter/rules/no-shadow-restricted-names"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-shouty-constants.md": { - id: "linter/rules/no-shouty-constants.md"; - slug: "linter/rules/no-shouty-constants"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-skipped-tests.md": { - id: "linter/rules/no-skipped-tests.md"; - slug: "linter/rules/no-skipped-tests"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-sparse-array.md": { - id: "linter/rules/no-sparse-array.md"; - slug: "linter/rules/no-sparse-array"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-static-only-class.md": { - id: "linter/rules/no-static-only-class.md"; - slug: "linter/rules/no-static-only-class"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-string-case-mismatch.md": { - id: "linter/rules/no-string-case-mismatch.md"; - slug: "linter/rules/no-string-case-mismatch"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-suspicious-semicolon-in-jsx.md": { - id: "linter/rules/no-suspicious-semicolon-in-jsx.md"; - slug: "linter/rules/no-suspicious-semicolon-in-jsx"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-svg-without-title.md": { - id: "linter/rules/no-svg-without-title.md"; - slug: "linter/rules/no-svg-without-title"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-switch-declarations.md": { - id: "linter/rules/no-switch-declarations.md"; - slug: "linter/rules/no-switch-declarations"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-then-property.md": { - id: "linter/rules/no-then-property.md"; - slug: "linter/rules/no-then-property"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-this-in-static.md": { - id: "linter/rules/no-this-in-static.md"; - slug: "linter/rules/no-this-in-static"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-undeclared-dependencies.md": { - id: "linter/rules/no-undeclared-dependencies.md"; - slug: "linter/rules/no-undeclared-dependencies"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-undeclared-variables.md": { - id: "linter/rules/no-undeclared-variables.md"; - slug: "linter/rules/no-undeclared-variables"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unnecessary-continue.md": { - id: "linter/rules/no-unnecessary-continue.md"; - slug: "linter/rules/no-unnecessary-continue"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unreachable-super.md": { - id: "linter/rules/no-unreachable-super.md"; - slug: "linter/rules/no-unreachable-super"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unreachable.md": { - id: "linter/rules/no-unreachable.md"; - slug: "linter/rules/no-unreachable"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unsafe-declaration-merging.md": { - id: "linter/rules/no-unsafe-declaration-merging.md"; - slug: "linter/rules/no-unsafe-declaration-merging"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unsafe-finally.md": { - id: "linter/rules/no-unsafe-finally.md"; - slug: "linter/rules/no-unsafe-finally"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unsafe-negation.md": { - id: "linter/rules/no-unsafe-negation.md"; - slug: "linter/rules/no-unsafe-negation"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unsafe-optional-chaining.md": { - id: "linter/rules/no-unsafe-optional-chaining.md"; - slug: "linter/rules/no-unsafe-optional-chaining"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unused-imports.md": { - id: "linter/rules/no-unused-imports.md"; - slug: "linter/rules/no-unused-imports"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unused-labels.md": { - id: "linter/rules/no-unused-labels.md"; - slug: "linter/rules/no-unused-labels"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unused-private-class-members.md": { - id: "linter/rules/no-unused-private-class-members.md"; - slug: "linter/rules/no-unused-private-class-members"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unused-template-literal.md": { - id: "linter/rules/no-unused-template-literal.md"; - slug: "linter/rules/no-unused-template-literal"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-unused-variables.md": { - id: "linter/rules/no-unused-variables.md"; - slug: "linter/rules/no-unused-variables"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-catch.md": { - id: "linter/rules/no-useless-catch.md"; - slug: "linter/rules/no-useless-catch"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-constructor.md": { - id: "linter/rules/no-useless-constructor.md"; - slug: "linter/rules/no-useless-constructor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-else.md": { - id: "linter/rules/no-useless-else.md"; - slug: "linter/rules/no-useless-else"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-empty-export.md": { - id: "linter/rules/no-useless-empty-export.md"; - slug: "linter/rules/no-useless-empty-export"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-fragments.md": { - id: "linter/rules/no-useless-fragments.md"; - slug: "linter/rules/no-useless-fragments"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-label.md": { - id: "linter/rules/no-useless-label.md"; - slug: "linter/rules/no-useless-label"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-lone-block-statements.md": { - id: "linter/rules/no-useless-lone-block-statements.md"; - slug: "linter/rules/no-useless-lone-block-statements"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-rename.md": { - id: "linter/rules/no-useless-rename.md"; - slug: "linter/rules/no-useless-rename"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-switch-case.md": { - id: "linter/rules/no-useless-switch-case.md"; - slug: "linter/rules/no-useless-switch-case"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-ternary.md": { - id: "linter/rules/no-useless-ternary.md"; - slug: "linter/rules/no-useless-ternary"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-this-alias.md": { - id: "linter/rules/no-useless-this-alias.md"; - slug: "linter/rules/no-useless-this-alias"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-useless-type-constraint.md": { - id: "linter/rules/no-useless-type-constraint.md"; - slug: "linter/rules/no-useless-type-constraint"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-var.md": { - id: "linter/rules/no-var.md"; - slug: "linter/rules/no-var"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-void-elements-with-children.md": { - id: "linter/rules/no-void-elements-with-children.md"; - slug: "linter/rules/no-void-elements-with-children"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-void-type-return.md": { - id: "linter/rules/no-void-type-return.md"; - slug: "linter/rules/no-void-type-return"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-void.md": { - id: "linter/rules/no-void.md"; - slug: "linter/rules/no-void"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/no-with.md": { - id: "linter/rules/no-with.md"; - slug: "linter/rules/no-with"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-alt-text.md": { - id: "linter/rules/use-alt-text.md"; - slug: "linter/rules/use-alt-text"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-anchor-content.md": { - id: "linter/rules/use-anchor-content.md"; - slug: "linter/rules/use-anchor-content"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-aria-activedescendant-with-tabindex.md": { - id: "linter/rules/use-aria-activedescendant-with-tabindex.md"; - slug: "linter/rules/use-aria-activedescendant-with-tabindex"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-aria-props-for-role.md": { - id: "linter/rules/use-aria-props-for-role.md"; - slug: "linter/rules/use-aria-props-for-role"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-arrow-function.md": { - id: "linter/rules/use-arrow-function.md"; - slug: "linter/rules/use-arrow-function"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-as-const-assertion.md": { - id: "linter/rules/use-as-const-assertion.md"; - slug: "linter/rules/use-as-const-assertion"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-await.md": { - id: "linter/rules/use-await.md"; - slug: "linter/rules/use-await"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-block-statements.md": { - id: "linter/rules/use-block-statements.md"; - slug: "linter/rules/use-block-statements"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-button-type.md": { - id: "linter/rules/use-button-type.md"; - slug: "linter/rules/use-button-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-collapsed-else-if.md": { - id: "linter/rules/use-collapsed-else-if.md"; - slug: "linter/rules/use-collapsed-else-if"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-consistent-array-type.md": { - id: "linter/rules/use-consistent-array-type.md"; - slug: "linter/rules/use-consistent-array-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-const.md": { - id: "linter/rules/use-const.md"; - slug: "linter/rules/use-const"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-default-parameter-last.md": { - id: "linter/rules/use-default-parameter-last.md"; - slug: "linter/rules/use-default-parameter-last"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-default-switch-clause-last.md": { - id: "linter/rules/use-default-switch-clause-last.md"; - slug: "linter/rules/use-default-switch-clause-last"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-enum-initializers.md": { - id: "linter/rules/use-enum-initializers.md"; - slug: "linter/rules/use-enum-initializers"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-exhaustive-dependencies.md": { - id: "linter/rules/use-exhaustive-dependencies.md"; - slug: "linter/rules/use-exhaustive-dependencies"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-exponentiation-operator.md": { - id: "linter/rules/use-exponentiation-operator.md"; - slug: "linter/rules/use-exponentiation-operator"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-export-type.md": { - id: "linter/rules/use-export-type.md"; - slug: "linter/rules/use-export-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-filenaming-convention.md": { - id: "linter/rules/use-filenaming-convention.md"; - slug: "linter/rules/use-filenaming-convention"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-flat-map.md": { - id: "linter/rules/use-flat-map.md"; - slug: "linter/rules/use-flat-map"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-for-of.md": { - id: "linter/rules/use-for-of.md"; - slug: "linter/rules/use-for-of"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-fragment-syntax.md": { - id: "linter/rules/use-fragment-syntax.md"; - slug: "linter/rules/use-fragment-syntax"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-getter-return.md": { - id: "linter/rules/use-getter-return.md"; - slug: "linter/rules/use-getter-return"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-heading-content.md": { - id: "linter/rules/use-heading-content.md"; - slug: "linter/rules/use-heading-content"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-hook-at-top-level.md": { - id: "linter/rules/use-hook-at-top-level.md"; - slug: "linter/rules/use-hook-at-top-level"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-html-lang.md": { - id: "linter/rules/use-html-lang.md"; - slug: "linter/rules/use-html-lang"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-iframe-title.md": { - id: "linter/rules/use-iframe-title.md"; - slug: "linter/rules/use-iframe-title"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-import-restrictions.md": { - id: "linter/rules/use-import-restrictions.md"; - slug: "linter/rules/use-import-restrictions"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-import-type.md": { - id: "linter/rules/use-import-type.md"; - slug: "linter/rules/use-import-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-is-array.md": { - id: "linter/rules/use-is-array.md"; - slug: "linter/rules/use-is-array"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-is-nan.md": { - id: "linter/rules/use-is-nan.md"; - slug: "linter/rules/use-is-nan"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-jsx-key-in-iterable.md": { - id: "linter/rules/use-jsx-key-in-iterable.md"; - slug: "linter/rules/use-jsx-key-in-iterable"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-key-with-click-events.md": { - id: "linter/rules/use-key-with-click-events.md"; - slug: "linter/rules/use-key-with-click-events"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-key-with-mouse-events.md": { - id: "linter/rules/use-key-with-mouse-events.md"; - slug: "linter/rules/use-key-with-mouse-events"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-literal-enum-members.md": { - id: "linter/rules/use-literal-enum-members.md"; - slug: "linter/rules/use-literal-enum-members"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-literal-keys.md": { - id: "linter/rules/use-literal-keys.md"; - slug: "linter/rules/use-literal-keys"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-media-caption.md": { - id: "linter/rules/use-media-caption.md"; - slug: "linter/rules/use-media-caption"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-namespace-keyword.md": { - id: "linter/rules/use-namespace-keyword.md"; - slug: "linter/rules/use-namespace-keyword"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-naming-convention.md": { - id: "linter/rules/use-naming-convention.md"; - slug: "linter/rules/use-naming-convention"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-node-assert-strict.md": { - id: "linter/rules/use-node-assert-strict.md"; - slug: "linter/rules/use-node-assert-strict"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-nodejs-import-protocol.md": { - id: "linter/rules/use-nodejs-import-protocol.md"; - slug: "linter/rules/use-nodejs-import-protocol"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-number-namespace.md": { - id: "linter/rules/use-number-namespace.md"; - slug: "linter/rules/use-number-namespace"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-numeric-literals.md": { - id: "linter/rules/use-numeric-literals.md"; - slug: "linter/rules/use-numeric-literals"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-optional-chain.md": { - id: "linter/rules/use-optional-chain.md"; - slug: "linter/rules/use-optional-chain"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-regex-literals.md": { - id: "linter/rules/use-regex-literals.md"; - slug: "linter/rules/use-regex-literals"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-self-closing-elements.md": { - id: "linter/rules/use-self-closing-elements.md"; - slug: "linter/rules/use-self-closing-elements"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-shorthand-array-type.md": { - id: "linter/rules/use-shorthand-array-type.md"; - slug: "linter/rules/use-shorthand-array-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-shorthand-assign.md": { - id: "linter/rules/use-shorthand-assign.md"; - slug: "linter/rules/use-shorthand-assign"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-shorthand-function-type.md": { - id: "linter/rules/use-shorthand-function-type.md"; - slug: "linter/rules/use-shorthand-function-type"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-simple-number-keys.md": { - id: "linter/rules/use-simple-number-keys.md"; - slug: "linter/rules/use-simple-number-keys"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-simplified-logic-expression.md": { - id: "linter/rules/use-simplified-logic-expression.md"; - slug: "linter/rules/use-simplified-logic-expression"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-single-case-statement.md": { - id: "linter/rules/use-single-case-statement.md"; - slug: "linter/rules/use-single-case-statement"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-single-var-declarator.md": { - id: "linter/rules/use-single-var-declarator.md"; - slug: "linter/rules/use-single-var-declarator"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-sorted-classes.md": { - id: "linter/rules/use-sorted-classes.md"; - slug: "linter/rules/use-sorted-classes"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-template.md": { - id: "linter/rules/use-template.md"; - slug: "linter/rules/use-template"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-anchor.md": { - id: "linter/rules/use-valid-anchor.md"; - slug: "linter/rules/use-valid-anchor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-aria-props.md": { - id: "linter/rules/use-valid-aria-props.md"; - slug: "linter/rules/use-valid-aria-props"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-aria-role.md": { - id: "linter/rules/use-valid-aria-role.md"; - slug: "linter/rules/use-valid-aria-role"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-aria-values.md": { - id: "linter/rules/use-valid-aria-values.md"; - slug: "linter/rules/use-valid-aria-values"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-for-direction.md": { - id: "linter/rules/use-valid-for-direction.md"; - slug: "linter/rules/use-valid-for-direction"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-lang.md": { - id: "linter/rules/use-valid-lang.md"; - slug: "linter/rules/use-valid-lang"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-valid-typeof.md": { - id: "linter/rules/use-valid-typeof.md"; - slug: "linter/rules/use-valid-typeof"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-while.md": { - id: "linter/rules/use-while.md"; - slug: "linter/rules/use-while"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"linter/rules/use-yield.md": { - id: "linter/rules/use-yield.md"; - slug: "linter/rules/use-yield"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"pt-br/404.md": { - id: "pt-br/404.md"; - slug: "pt-br/404"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"pt-br/analyzer/import-sorting.mdx": { - id: "pt-br/analyzer/import-sorting.mdx"; - slug: "pt-br/analyzer/import-sorting"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/analyzer/index.mdx": { - id: "pt-br/analyzer/index.mdx"; - slug: "pt-br/analyzer"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/formatter/differences-with-prettier.md": { - id: "pt-br/formatter/differences-with-prettier.md"; - slug: "pt-br/formatter/differences-with-prettier"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"pt-br/formatter/index.mdx": { - id: "pt-br/formatter/index.mdx"; - slug: "pt-br/formatter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/formatter/option-philosophy.md": { - id: "pt-br/formatter/option-philosophy.md"; - slug: "pt-br/formatter/option-philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"pt-br/guides/big-projects.mdx": { - id: "pt-br/guides/big-projects.mdx"; - slug: "pt-br/guides/big-projects"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/guides/getting-started.mdx": { - id: "pt-br/guides/getting-started.mdx"; - slug: "pt-br/guides/getting-started"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/guides/how-biome-works.mdx": { - id: "pt-br/guides/how-biome-works.mdx"; - slug: "pt-br/guides/how-biome-works"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/guides/integrate-in-editor.mdx": { - id: "pt-br/guides/integrate-in-editor.mdx"; - slug: "pt-br/guides/integrate-in-editor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/guides/integrate-in-vcs.mdx": { - id: "pt-br/guides/integrate-in-vcs.mdx"; - slug: "pt-br/guides/integrate-in-vcs"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/guides/manual-installation.mdx": { - id: "pt-br/guides/manual-installation.mdx"; - slug: "pt-br/guides/manual-installation"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/index.mdx": { - id: "pt-br/index.mdx"; - slug: "pt-br"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/internals/architecture.mdx": { - id: "pt-br/internals/architecture.mdx"; - slug: "pt-br/internals/architecture"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/internals/credits.mdx": { - id: "pt-br/internals/credits.mdx"; - slug: "pt-br/internals/credits"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/internals/language-support.mdx": { - id: "pt-br/internals/language-support.mdx"; - slug: "pt-br/internals/language-support"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/internals/philosophy.mdx": { - id: "pt-br/internals/philosophy.mdx"; - slug: "pt-br/internals/philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/internals/versioning.mdx": { - id: "pt-br/internals/versioning.mdx"; - slug: "pt-br/internals/versioning"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/linter/index.mdx": { - id: "pt-br/linter/index.mdx"; - slug: "pt-br/linter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/recipes/continuous-integration.mdx": { - id: "pt-br/recipes/continuous-integration.mdx"; - slug: "pt-br/recipes/continuous-integration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/recipes/git-hooks.mdx": { - id: "pt-br/recipes/git-hooks.mdx"; - slug: "pt-br/recipes/git-hooks"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"pt-br/reference/vscode.mdx": { - id: "pt-br/reference/vscode.mdx"; - slug: "pt-br/reference/vscode"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"recipes/continuous-integration.mdx": { - id: "recipes/continuous-integration.mdx"; - slug: "recipes/continuous-integration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"recipes/git-hooks.mdx": { - id: "recipes/git-hooks.mdx"; - slug: "recipes/git-hooks"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"reference/cli.mdx": { - id: "reference/cli.mdx"; - slug: "reference/cli"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"reference/configuration.mdx": { - id: "reference/configuration.mdx"; - slug: "reference/configuration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"reference/vscode.mdx": { - id: "reference/vscode.mdx"; - slug: "reference/vscode"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/analyzer/import-sorting.mdx": { - id: "zh-cn/analyzer/import-sorting.mdx"; - slug: "zh-cn/analyzer/import-sorting"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/analyzer/index.mdx": { - id: "zh-cn/analyzer/index.mdx"; - slug: "zh-cn/analyzer"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/formatter/differences-with-prettier.md": { - id: "zh-cn/formatter/differences-with-prettier.md"; - slug: "zh-cn/formatter/differences-with-prettier"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"zh-cn/formatter/index.mdx": { - id: "zh-cn/formatter/index.mdx"; - slug: "zh-cn/formatter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/formatter/option-philosophy.md": { - id: "zh-cn/formatter/option-philosophy.md"; - slug: "zh-cn/formatter/option-philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".md"] }; -"zh-cn/guides/big-projects.mdx": { - id: "zh-cn/guides/big-projects.mdx"; - slug: "zh-cn/guides/big-projects"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/guides/getting-started.mdx": { - id: "zh-cn/guides/getting-started.mdx"; - slug: "zh-cn/guides/getting-started"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/guides/how-biome-works.mdx": { - id: "zh-cn/guides/how-biome-works.mdx"; - slug: "zh-cn/guides/how-biome-works"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/guides/integrate-in-editor.mdx": { - id: "zh-cn/guides/integrate-in-editor.mdx"; - slug: "zh-cn/guides/integrate-in-editor"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/guides/integrate-in-vcs.mdx": { - id: "zh-cn/guides/integrate-in-vcs.mdx"; - slug: "zh-cn/guides/integrate-in-vcs"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/guides/manual-installation.mdx": { - id: "zh-cn/guides/manual-installation.mdx"; - slug: "zh-cn/guides/manual-installation"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/index.mdx": { - id: "zh-cn/index.mdx"; - slug: "zh-cn"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/internals/architecture.mdx": { - id: "zh-cn/internals/architecture.mdx"; - slug: "zh-cn/internals/architecture"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/internals/changelog.mdx": { - id: "zh-cn/internals/changelog.mdx"; - slug: "zh-cn/internals/changelog"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/internals/credits.mdx": { - id: "zh-cn/internals/credits.mdx"; - slug: "zh-cn/internals/credits"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/internals/language-support.mdx": { - id: "zh-cn/internals/language-support.mdx"; - slug: "zh-cn/internals/language-support"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/internals/philosophy.mdx": { - id: "zh-cn/internals/philosophy.mdx"; - slug: "zh-cn/internals/philosophy"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/internals/versioning.mdx": { - id: "zh-cn/internals/versioning.mdx"; - slug: "zh-cn/internals/versioning"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/linter/index.mdx": { - id: "zh-cn/linter/index.mdx"; - slug: "zh-cn/linter"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/recipes/continuous-integration.mdx": { - id: "zh-cn/recipes/continuous-integration.mdx"; - slug: "zh-cn/recipes/continuous-integration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/recipes/git-hooks.mdx": { - id: "zh-cn/recipes/git-hooks.mdx"; - slug: "zh-cn/recipes/git-hooks"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/reference/configuration.mdx": { - id: "zh-cn/reference/configuration.mdx"; - slug: "zh-cn/reference/configuration"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -"zh-cn/reference/vscode.mdx": { - id: "zh-cn/reference/vscode.mdx"; - slug: "zh-cn/reference/vscode"; - body: string; - collection: "docs"; - data: InferEntrySchema<"docs"> -} & { render(): Render[".mdx"] }; -}; - - }; - - type DataEntryMap = { - "authors": { -"core": { - id: "core"; - collection: "authors"; - data: InferEntrySchema<"authors"> -}; -"ema": { - id: "ema"; - collection: "authors"; - data: InferEntrySchema<"authors"> -}; -"team": { - id: "team"; - collection: "authors"; - data: InferEntrySchema<"authors"> -}; -}; - - }; - - type AnyEntryMap = ContentEntryMap & DataEntryMap; - - export type ContentConfig = typeof import("../src/content/config.js"); -} From 90619bad8ecf1a1323875bcbac6646aacd0c0670 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Fri, 19 Apr 2024 11:03:55 +0900 Subject: [PATCH 12/15] fix: update option --- .../src/lint/nursery/no_css_empty_block.rs | 12 +++++------- packages/@biomejs/backend-jsonrpc/src/workspace.ts | 2 +- packages/@biomejs/biome/configuration_schema.json | 6 ++---- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index f4fc15e02dca..8d43289afe06 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -71,7 +71,7 @@ declare_rule! { #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NoCssEmptyBlockOptions { - pub ignore: Vec, + pub allow_comments: bool, } impl Rule for NoCssEmptyBlock { @@ -83,13 +83,9 @@ impl Rule for NoCssEmptyBlock { fn run(ctx: &RuleContext) -> Option { let node = ctx.query(); let options = ctx.options(); - let disallow_comments_inside_empty_block = options.ignore.iter().any(|i| i == "comments"); + let allow_comments_inside_empty_block = options.allow_comments; - if disallow_comments_inside_empty_block { - if node.is_empty() { - return Some(node.clone()); - } - } else if node.is_empty() { + if allow_comments_inside_empty_block { let has_comments_inside_block = node.r_curly_token().ok()?.has_leading_comments() || node.l_curly_token().ok()?.has_trailing_comments(); @@ -98,6 +94,8 @@ impl Rule for NoCssEmptyBlock { } else { return Some(node.clone()); } + } else if node.is_empty() { + return Some(node.clone()); } None diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index 4bb10e5688d5..c0b5fe1fd11b 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -1612,7 +1612,7 @@ export interface HooksOptions { */ export interface DeprecatedHooksOptions {} export interface NoCssEmptyBlockOptions { - ignore: string[]; + allowComments: boolean; } /** * Options for the rule `noRestrictedImports`. diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index db82b08b2d38..d57076d4dce4 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -1421,10 +1421,8 @@ }, "NoCssEmptyBlockOptions": { "type": "object", - "required": ["ignore"], - "properties": { - "ignore": { "type": "array", "items": { "type": "string" } } - }, + "required": ["allowComments"], + "properties": { "allowComments": { "type": "boolean" } }, "additionalProperties": false }, "Nursery": { From 3db5ef81aa050e7a754364e12563921d168cd0e1 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Fri, 19 Apr 2024 12:33:34 +0900 Subject: [PATCH 13/15] fix: logic --- .../src/lint/nursery/no_css_empty_block.rs | 24 ++++++++----- .../noCssEmptyBlock/disallowComment.css.snap | 14 ++++---- .../disallowComment.options.json | 4 +-- .../nursery/noCssEmptyBlock/invalid.css.snap | 36 +++++++++---------- 4 files changed, 41 insertions(+), 37 deletions(-) diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 8d43289afe06..457519591e9d 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -6,9 +6,8 @@ use biome_rowan::AstNode; use serde::{Deserialize, Serialize}; declare_rule! { - /// Disallow css empty blocks. + /// Disallow CSS empty blocks. /// - /// This rule disallows empty block. /// By default, it will allow empty blocks with comments inside. /// /// ## Examples @@ -53,7 +52,7 @@ declare_rule! { /// { /// "noCssEmptyBlock": { /// "options": { - /// "ignore": ["comments"] + /// "allow_comments": false /// } /// } /// } @@ -67,29 +66,36 @@ declare_rule! { } } -#[derive(Clone, Debug, Default, Serialize, Deserialize, Deserializable, Eq, PartialEq)] -#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] +#[derive(Debug, Clone, Deserialize, Deserializable, Eq, PartialEq, Serialize)] +#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct NoCssEmptyBlockOptions { pub allow_comments: bool, } +impl Default for NoCssEmptyBlockOptions { + fn default() -> Self { + Self { + allow_comments: true, + } + } +} + impl Rule for NoCssEmptyBlock { type Query = Ast; type State = CssBlockLike; type Signals = Option; - type Options = Box; + type Options = NoCssEmptyBlockOptions; fn run(ctx: &RuleContext) -> Option { let node = ctx.query(); let options = ctx.options(); let allow_comments_inside_empty_block = options.allow_comments; - if allow_comments_inside_empty_block { let has_comments_inside_block = node.r_curly_token().ok()?.has_leading_comments() || node.l_curly_token().ok()?.has_trailing_comments(); - if has_comments_inside_block { + if !node.is_empty() || has_comments_inside_block { return None; } else { return Some(node.clone()); @@ -108,7 +114,7 @@ impl Rule for NoCssEmptyBlock { rule_category!(), span, markup! { - "Unexpected empty block is not allowed" + "Empty blocks aren't allowed." }, ) .note(markup! { diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap index ca7b2591a7d6..b88b124b400d 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.css.snap @@ -29,7 +29,7 @@ a { ``` disallowComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. > 1 │ a { /* foo */ } │ ^^^^^^^^^^^^^ @@ -44,7 +44,7 @@ disallowComment.css:1:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━ ``` disallowComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 1 │ a { /* foo */ } > 2 │ a { @@ -63,7 +63,7 @@ disallowComment.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━ ``` disallowComment.css:6:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 4 │ } 5 │ @@ -80,7 +80,7 @@ disallowComment.css:6:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━ ``` disallowComment.css:7:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 6 │ .b { /* foo */ } > 7 │ .b { @@ -99,7 +99,7 @@ disallowComment.css:7:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━ ``` disallowComment.css:11:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 9 │ } 10 │ @@ -116,7 +116,7 @@ disallowComment.css:11:14 lint/nursery/noCssEmptyBlock ━━━━━━━━ ``` disallowComment.css:12:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 11 │ @media print { /* foo */ } > 12 │ @media print { @@ -135,7 +135,7 @@ disallowComment.css:12:14 lint/nursery/noCssEmptyBlock ━━━━━━━━ ``` disallowComment.css:16:5 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 14 │ } 15 │ @media print { diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.options.json b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.options.json index 45d2a75e8085..8b7ebcfa0717 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.options.json +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/disallowComment.options.json @@ -6,9 +6,7 @@ "noCssEmptyBlock": { "level": "error", "options": { - "ignore": [ - "comments" - ] + "allowComments": false } } } diff --git a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap index 003a142343a3..f65db7d66865 100644 --- a/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap +++ b/crates/biome_css_analyze/tests/specs/nursery/noCssEmptyBlock/invalid.css.snap @@ -65,7 +65,7 @@ a { ``` invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 1 │ /* CssDeclarationOrRuleBlock */ > 2 │ a {} @@ -81,7 +81,7 @@ invalid.css:2:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 1 │ /* CssDeclarationOrRuleBlock */ 2 │ a {} @@ -98,7 +98,7 @@ invalid.css:3:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:4:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 2 │ a {} 3 │ a { } @@ -118,7 +118,7 @@ invalid.css:4:3 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:8:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 6 │ } 7 │ @@ -135,7 +135,7 @@ invalid.css:8:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:9:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 8 │ .b {} > 9 │ .b { } @@ -151,7 +151,7 @@ invalid.css:9:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:10:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 8 │ .b {} 9 │ .b { } @@ -171,7 +171,7 @@ invalid.css:10:4 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:15:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 14 │ /* CssRuleBlock */ > 15 │ @media print {} @@ -187,7 +187,7 @@ invalid.css:15:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:16:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 14 │ /* CssRuleBlock */ 15 │ @media print {} @@ -207,7 +207,7 @@ invalid.css:16:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:19:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 18 │ } > 19 │ @media print { a {} } @@ -223,7 +223,7 @@ invalid.css:19:18 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:22:30 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 21 │ /* CssDeclarationBlock */ > 22 │ @font-palette-values --ident {} @@ -239,7 +239,7 @@ invalid.css:22:30 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:23:12 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 21 │ /* CssDeclarationBlock */ 22 │ @font-palette-values --ident {} @@ -256,7 +256,7 @@ invalid.css:23:12 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:26:20 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 25 │ /* CssKeyframesBlock */ > 26 │ @keyframes slidein {} @@ -272,7 +272,7 @@ invalid.css:26:20 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:28:10 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 26 │ @keyframes slidein {} 27 │ @keyframes slidein { @@ -291,7 +291,7 @@ invalid.css:28:10 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:38:13 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 36 │ /* CssFontFeatureValuesBlock */ 37 │ @font-feature-values Font One { @@ -311,7 +311,7 @@ invalid.css:38:13 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:44:7 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 43 │ /* CssPageAtRuleBlock */ > 44 │ @page {} @@ -327,7 +327,7 @@ invalid.css:44:7 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:45:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 43 │ /* CssPageAtRuleBlock */ 44 │ @page {} @@ -345,7 +345,7 @@ invalid.css:45:14 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:50:28 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 49 │ /* CssDeclarationOrAtRuleBlock */ > 50 │ @page :left { @left-middle {} background: red; } @@ -361,7 +361,7 @@ invalid.css:50:28 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━ ``` invalid.css:52:16 lint/nursery/noCssEmptyBlock ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - ! Unexpected empty block is not allowed + ! Empty blocks aren't allowed. 50 │ @page :left { @left-middle {} background: red; } 51 │ @page { From d1d4206ad0111667cc48dfd9da62c76c7ae91946 Mon Sep 17 00:00:00 2001 From: togami2864 Date: Fri, 19 Apr 2024 12:50:48 +0900 Subject: [PATCH 14/15] chore; gen-lint --- crates/biome_configuration/src/linter/rules.rs | 2 +- crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs | 2 +- packages/@biomejs/backend-jsonrpc/src/workspace.ts | 2 +- packages/@biomejs/biome/configuration_schema.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/biome_configuration/src/linter/rules.rs b/crates/biome_configuration/src/linter/rules.rs index c755ba06a0c3..315debd03366 100644 --- a/crates/biome_configuration/src/linter/rules.rs +++ b/crates/biome_configuration/src/linter/rules.rs @@ -2656,7 +2656,7 @@ pub struct Nursery { #[doc = "Disallow the use of Math.min and Math.max to clamp a value where the result itself is constant."] #[serde(skip_serializing_if = "Option::is_none")] pub no_constant_math_min_max_clamp: Option>, - #[doc = "Disallow css empty blocks."] + #[doc = "Disallow CSS empty blocks."] #[serde(skip_serializing_if = "Option::is_none")] pub no_css_empty_block: Option>, #[doc = "Disallow using a callback in asynchronous tests and hooks."] diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 457519591e9d..09e1a1c6baa1 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -46,7 +46,7 @@ declare_rule! { /// /// ## Options /// - /// Exclude comments from being treated as content inside of a block. + /// If false, exclude comments from being treated as content inside of a block. /// /// ```json /// { diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index c0b5fe1fd11b..9702355d60b5 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -921,7 +921,7 @@ export interface Nursery { */ noConstantMathMinMaxClamp?: RuleConfiguration_for_Null; /** - * Disallow css empty blocks. + * Disallow CSS empty blocks. */ noCssEmptyBlock?: RuleConfiguration_for_NoCssEmptyBlockOptions; /** diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index d57076d4dce4..3520a460b919 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -1455,7 +1455,7 @@ ] }, "noCssEmptyBlock": { - "description": "Disallow css empty blocks.", + "description": "Disallow CSS empty blocks.", "anyOf": [ { "$ref": "#/definitions/NoCssEmptyBlockConfiguration" }, { "type": "null" } From d390719b9d56c532c2ec69aac5b23c4dcd4f25c0 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Fri, 19 Apr 2024 08:27:25 +0100 Subject: [PATCH 15/15] Update crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs --- crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs index 09e1a1c6baa1..0e1fd2e958de 100644 --- a/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs +++ b/crates/biome_css_analyze/src/lint/nursery/no_css_empty_block.rs @@ -52,7 +52,7 @@ declare_rule! { /// { /// "noCssEmptyBlock": { /// "options": { - /// "allow_comments": false + /// "allowComments": false /// } /// } /// }