Skip to main content

Configs

stylelint-plugin-grid exports two ESM-first shareable configs.

ConfigPurpose
๐ŸŸข โ€” gridPluginConfigs["grid-recommended"]Low-noise checks for broadly applicable CSS Grid correctness.
๐ŸŸฃ โ€” gridPluginConfigs["grid-all"]Every public rule, including stricter same-stylesheet policy checks.

Use grid-recommended first, then move selected stricter rules into your local config after confirming they match your project's file boundaries.

Config Pagesโ€‹

  • grid-recommended enables the low-noise baseline.
  • grid-all enables every public rule, including same-stylesheet policy checks.
  • Current status explains why some rules are kept out of the recommended config.

Rules by Configโ€‹

Fix legend: ๐Ÿ”ง = autofixable ยท โ€” = report only

Config legend: โœ… = enabled ยท โ€” = not enabled

RuleFixgrid-allgrid-recommendedDescription
consistent-area-namingโ€”โœ…โ€”Require consistent naming for grid-template-areas and single-name grid-area identifiers.
no-conflicting-placementโ€”โœ…โœ…Disallow same-block CSS Grid placement declarations that write the same placement slot.
no-dense-auto-flowโ€”โœ…โ€”Disallow grid-auto-flow: dense because it can reorder auto-placed grid items visually.
no-ineffective-container-propertiesโ€”โœ…โœ…Disallow CSS Grid container declarations in blocks whose final literal display value is not grid-capable.
no-invalid-areasโ€”โœ…โœ…Disallow malformed grid-template-areas declarations.
no-invalid-auto-repeatโ€”โœ…โœ…Disallow definitely invalid CSS Grid auto-repeat track sizes.
no-invalid-minmaxโ€”โœ…โœ…Disallow flexible fr values as the minimum argument in CSS Grid minmax() track sizes.
no-invalid-repeat-countโ€”โœ…โœ…Disallow invalid fixed repeat counts in CSS Grid track templates.
no-invalid-spanโ€”โœ…โœ…Disallow non-positive span counts in CSS Grid placement declarations.
no-mismatched-template-rowsโ€”โœ…โœ…Require grid-template-rows track count to match grid-template-areas row count.
no-overlapping-areasโ€”โœ…โ€”Disallow multiple selectors assigning the same single-name grid-area value in one stylesheet.
no-reversed-placement-linesโ€”โœ…โœ…Disallow reversed or zero-width numeric CSS Grid placement line ranges.
no-unknown-areasโ€”โœ…โœ…Disallow single-name grid-area references that do not match any named area declared in the same stylesheet.
no-unused-areasโ€”โœ…โ€”Disallow named template areas that are never referenced by a single-name grid-area declaration in the same stylesheet.
no-zero-grid-linesโ€”โœ…โœ…Disallow line 0 in CSS Grid placement declarations.
prefer-gap-properties๐Ÿ”งโœ…โœ…Prefer modern gap, row-gap, and column-gap properties over legacy grid gap aliases.
prefer-minmax-zero-frโ€”โœ…โ€”Prefer minmax(0, <flex>) for bare flexible CSS Grid column tracks.
require-explicit-rows-with-column-flowโ€”โœ…โ€”Require explicit row sizing when a rule uses grid-auto-flow: column.
require-explicit-tracks-with-areasโ€”โœ…โ€”Require explicit track sizing alongside CSS Grid named area templates.
validate-area-shapesโ€”โœ…โœ…Require every named grid template area to form one contiguous rectangle.
validate-track-countsโ€”โœ…โœ…Require template row and column track counts to match grid-template-areas dimensions.