Skip to main content

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

RuleFixDescription
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.