docusaurus-all
docusaurusPluginConfigs["docusaurus-all"] enables the full current public rule catalog.
Usageโ
import { docusaurusPluginConfigs } from "stylelint-plugin-docusaurus";
export default docusaurusPluginConfigs["docusaurus-all"];
Current behaviorโ
This config enables every current public rule, including stricter opt-in rules for CSS Modules boundaries, content-scope hygiene, responsive navbar/sidebar contracts, paired color-mode overrides, curated token preferences, and cascade-layer safety.
Intended future roleโ
As the plugin grows, docusaurus-all should remain the exhaustive opt-in surface for teams that want every stable public docusaurus/* rule enabled at once.
Rules in this configโ
Fix legend: ๐ง = autofixable ยท โ = report only
| Rule | Fix | Description |
|---|---|---|
no-broad-all-resets-outside-isolation-subtrees | โ | Disallow broad all: initial|revert|unset resets outside explicitly isolated local subtrees. |
no-color-scheme-on-docusaurus-html-root | โ | Disallow color-scheme declarations on Docusaurus root selectors managed by the framework. |
no-direct-project-token-consumption-in-css-modules | โ | Disallow direct project-scoped CSS custom property token consumption in CSS Modules declarations. |
no-direct-theme-token-consumption-in-css-modules | โ | Disallow direct --ifm-* and --docsearch-* token consumption in CSS Modules declarations. |
no-docusaurus-layer-name-collisions | โ | Disallow author-defined cascade layer names that collide with reserved Docusaurus-managed layer prefixes. |
no-hardcoded-docusaurus-breakpoint-values | โ | Disallow hardcoded pixel values in @media queries that match Docusaurus/Infima documented breakpoints. |
no-important-on-infima-or-docusaurus-selector-overrides | โ | Disallow !important on declarations inside rules that target Infima or Docusaurus class selectors. |
no-invalid-theme-custom-property-scope | โ | Disallow declaring Docusaurus theme custom properties outside global theme scopes, except for DocSearch variables scoped to the DocSearch UI. |
no-mobile-navbar-backdrop-filter | โ | Disallow backdrop-filter on Docusaurus navbar selectors unless it is guarded behind the desktop breakpoint. |
no-mobile-navbar-stacking-context-traps | โ | Disallow containing-block and stacking-context properties on Docusaurus navbar selectors unless they are guarded behind the desktop breakpoint. |
no-navbar-breakpoint-desync | โ | Disallow custom CSS breakpoints for Docusaurus mobile navbar/sidebar surfaces that can desync from the built-in JS breakpoint. |
no-revert-layer-outside-isolation-subtrees | โ | Disallow revert-layer usage outside explicitly isolated local subtrees. |
no-subtree-data-theme-selectors | โ | Disallow subtree-scoped data-theme selectors that do not start from the Docusaurus root color-mode attribute. |
no-unanchored-infima-subcomponent-selectors | โ | Disallow unanchored Infima subcomponent selectors in global Docusaurus stylesheets. |
no-unsafe-theme-internal-selectors | โ | Disallow curated unsafe Docusaurus internal selector fallbacks that have no documented stable CSS contract. |
no-unscoped-content-element-overrides | โ | Disallow unscoped content-element overrides that leak across the whole Docusaurus site. |
no-unstable-docusaurus-generated-class-selectors | โ | Disallow exact selectors that target Docusaurus theme CSS-module class names with unstable hash suffixes. |
no-unwrapped-global-theme-selectors-in-css-modules | โ | Disallow unwrapped Docusaurus and Infima global theme selectors inside CSS Modules. |
prefer-data-theme-color-mode | ๐ง | Prefer Docusaurus data-theme selectors over legacy theme-dark/theme-light classes. |
prefer-data-theme-docsearch-overrides | โ | Prefer [data-theme] selectors over .navbar--dark when overriding DocSearch styles. |
prefer-data-theme-over-prefers-color-scheme | โ | Prefer Docusaurus data-theme selector scopes over prefers-color-scheme media queries when styling Docusaurus theme tokens or global theme surfaces. |
prefer-docsearch-theme-tokens-over-structural-overrides | โ | Prefer curated DocSearch theme tokens over hard-coded structural overrides on common DocSearch UI surfaces. |
prefer-infima-theme-tokens-over-structural-overrides | โ | Prefer curated Infima theme tokens over hard-coded structural overrides on common Docusaurus theme surfaces. |
prefer-stable-docusaurus-theme-class-names | โ | Prefer documented stable Docusaurus theme class names over attribute-selector fallbacks for known theme components. |
require-docsearch-color-mode-pairs | โ | Require paired light/dark DocSearch token override blocks when customizing DocSearch by color mode. |
require-docsearch-root-scope-for-docsearch-token-overrides | โ | Require DocSearch token overrides to live on the .DocSearch root scope instead of descendant or non-DocSearch selectors. |
require-font-display-on-font-face | โ | Require a font-display declaration in every @font-face block. |
require-font-face-local-src-before-remote | โ | Require local() sources to appear before url() sources in @font-face src declarations. |
require-html-prefix-for-docusaurus-data-attribute-selectors | โ | Require an html prefix for bare Docusaurus root data-attribute selectors that target global theme surfaces. |
require-ifm-color-primary-scale | โ | Require the full recommended Infima primary color scale when overriding --ifm-color-primary. |
require-ifm-color-primary-scale-per-color-mode | โ | Require matching Infima primary color-scale overrides for each Docusaurus color mode you customize. |
require-local-anchor-for-global-theme-overrides-in-css-modules | โ | Require a local selector anchor when overriding Docusaurus global theme surfaces inside CSS Modules. |
require-reduced-motion-override-for-interactive-transitions | โ | Require a @media (prefers-reduced-motion) override for interactive selectors that declare transition or animation. |