Skip to content

Commit

Permalink
chore: rename useConsistentGridAreas to noInvalidGridAreas
Browse files Browse the repository at this point in the history
  • Loading branch information
togami2864 committed Sep 6, 2024
1 parent dff0a0e commit 32b2ca9
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 43 deletions.
14 changes: 7 additions & 7 deletions crates/biome_configuration/src/analyzer/linter/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3031,8 +3031,8 @@ pub struct Nursery {
Option<RuleFixConfiguration<biome_js_analyze::options::UseConsistentCurlyBraces>>,
#[doc = "Disallows invalid named grid areas in CSS Grid Layouts."]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_consistent_grid_areas:
Option<RuleConfiguration<biome_css_analyze::options::UseConsistentGridAreas>>,
pub no_invalid_grid_areas:
Option<RuleConfiguration<biome_css_analyze::options::NoInvalidGridAreas>>,
#[doc = "Require consistent accessibility modifiers on class properties and methods."]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_consistent_member_accessibility:
Expand Down Expand Up @@ -3165,7 +3165,7 @@ impl Nursery {
"useAriaPropsSupportedByRole",
"useConsistentBuiltinInstantiation",
"useConsistentCurlyBraces",
"useConsistentGridAreas",
"noInvalidGridAreas",
"useConsistentMemberAccessibility",
"useDateNow",
"useDefaultSwitchClause",
Expand Down Expand Up @@ -3531,7 +3531,7 @@ impl Nursery {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]));
}
}
if let Some(rule) = self.use_consistent_grid_areas.as_ref() {
if let Some(rule) = self.no_invalid_grid_areas.as_ref() {
if rule.is_enabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42]));
}
Expand Down Expand Up @@ -3845,7 +3845,7 @@ impl Nursery {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[41]));
}
}
if let Some(rule) = self.use_consistent_grid_areas.as_ref() {
if let Some(rule) = self.no_invalid_grid_areas.as_ref() {
if rule.is_disabled() {
index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[42]));
}
Expand Down Expand Up @@ -4149,8 +4149,8 @@ impl Nursery {
.use_consistent_curly_braces
.as_ref()
.map(|conf| (conf.level(), conf.get_options())),
"useConsistentGridAreas" => self
.use_consistent_grid_areas
"noInvalidGridAreas" => self
.no_invalid_grid_areas
.as_ref()
.map(|conf| (conf.level(), conf.get_options())),
"useConsistentMemberAccessibility" => self
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_css_analyze/src/lint/nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pub mod no_duplicate_selectors_keyframe_block;
pub mod no_empty_block;
pub mod no_important_in_keyframe;
pub mod no_invalid_direction_in_linear_gradient;
pub mod no_invalid_grid_areas;
pub mod no_invalid_position_at_import_rule;
pub mod no_irregular_whitespace;
pub mod no_shorthand_property_overrides;
Expand All @@ -19,7 +20,6 @@ pub mod no_unknown_selector_pseudo_element;
pub mod no_unknown_unit;
pub mod no_unmatchable_anb_selector;
pub mod no_value_at_rule;
pub mod use_consistent_grid_areas;
pub mod use_generic_font_names;

declare_lint_group! {
Expand All @@ -43,7 +43,7 @@ declare_lint_group! {
self :: no_unknown_unit :: NoUnknownUnit ,
self :: no_unmatchable_anb_selector :: NoUnmatchableAnbSelector ,
self :: no_value_at_rule :: NoValueAtRule ,
self :: use_consistent_grid_areas :: UseConsistentGridAreas ,
self :: no_invalid_grid_areas :: NoInvalidGridAreas ,
self :: use_generic_font_names :: UseGenericFontNames ,
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ declare_lint_rule! {
/// "a a a"; }
/// ```
///
pub UseConsistentGridAreas {
pub NoInvalidGridAreas {
version: "next",
name: "useConsistentGridAreas",
name: "noInvalidGridAreas",
language: "css",
recommended: false,
sources: &[RuleSource::Stylelint("named-grid-areas-no-invalid")],
Expand All @@ -73,7 +73,7 @@ pub struct UseConsistentGridAreasState {
reason: GridAreaValidationError,
}

impl Rule for UseConsistentGridAreas {
impl Rule for NoInvalidGridAreas {
type Query = Ast<CssDeclarationOrRuleList>;
type State = UseConsistentGridAreasState;
type Signals = Option<Self::State>;
Expand Down
3 changes: 2 additions & 1 deletion crates/biome_css_analyze/src/options.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ a { grid-template-areas: "a a a"

# Diagnostics
```
invalid.css:1:26 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:1:26 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Empty grid areas are not allowed.
Expand All @@ -52,7 +52,7 @@ invalid.css:1:26 lint/nursery/useConsistentGridAreas ━━━━━━━━━
```

```
invalid.css:2:26 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:2:26 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Inconsistent cell count in grid areas are not allowed.
Expand All @@ -68,7 +68,7 @@ invalid.css:2:26 lint/nursery/useConsistentGridAreas ━━━━━━━━━
```
```
invalid.css:4:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:4:33 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Empty grid areas are not allowed.
Expand All @@ -87,7 +87,7 @@ invalid.css:4:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━
```
```
invalid.css:6:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:6:33 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Duplicate filled in rectangle are not allowed.
Expand All @@ -106,7 +106,7 @@ invalid.css:6:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━
```
```
invalid.css:11:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:11:33 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Duplicate filled in rectangle are not allowed.
Expand All @@ -125,7 +125,7 @@ invalid.css:11:33 lint/nursery/useConsistentGridAreas ━━━━━━━━
```
```
invalid.css:15:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:15:33 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Duplicate filled in rectangle are not allowed.
Expand All @@ -144,7 +144,7 @@ invalid.css:15:33 lint/nursery/useConsistentGridAreas ━━━━━━━━
```
```
invalid.css:17:35 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:17:35 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Duplicate filled in rectangle are not allowed.
Expand All @@ -163,7 +163,7 @@ invalid.css:17:35 lint/nursery/useConsistentGridAreas ━━━━━━━━
```
```
invalid.css:21:35 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:21:35 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Inconsistent cell count in grid areas are not allowed.
Expand All @@ -182,7 +182,7 @@ invalid.css:21:35 lint/nursery/useConsistentGridAreas ━━━━━━━━
```
```
invalid.css:24:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:24:33 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Duplicate filled in rectangle are not allowed.
Expand All @@ -201,7 +201,7 @@ invalid.css:24:33 lint/nursery/useConsistentGridAreas ━━━━━━━━
```
```
invalid.css:27:33 lint/nursery/useConsistentGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
invalid.css:27:33 lint/nursery/noInvalidGridAreas ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
! Duplicate filled in rectangle are not allowed.
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ define_categories! {
"lint/nursery/useBiomeSuppressionComment": "https://biomejs.dev/linter/rules/use-biome-suppression-comment",
"lint/nursery/useConsistentBuiltinInstantiation": "https://biomejs.dev/linter/rules/use-consistent-new-builtin",
"lint/nursery/useConsistentCurlyBraces": "https://biomejs.dev/linter/rules/use-consistent-curly-braces",
"lint/nursery/useConsistentGridAreas": "https://biomejs.dev/linter/rules/use-consistent-grid-areas",
"lint/nursery/noInvalidGridAreas": "https://biomejs.dev/linter/rules/use-consistent-grid-areas",
"lint/nursery/useConsistentMemberAccessibility": "https://biomejs.dev/linter/rules/use-consistent-member-accessibility",
"lint/nursery/useDateNow": "https://biomejs.dev/linter/rules/use-date-now",
"lint/nursery/useDefaultSwitchClause": "https://biomejs.dev/linter/rules/use-default-switch-clause",
Expand Down
36 changes: 18 additions & 18 deletions packages/@biomejs/backend-jsonrpc/src/workspace.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@biomejs/biome/configuration_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 32b2ca9

Please sign in to comment.