Skip to main content

require-rspack-bundler-for-faster-persistent-cache

Require future.faster.rspackBundler when rspackPersistentCache is enabled in faster config.

Targeted pattern scopeโ€‹

This rule focuses on docusaurus.config.* files.

It validates the documented dependency between:

  • rspackPersistentCache: true
  • rspackBundler: true

inside either:

  • future.faster
  • future.experimental_faster

What this rule reportsโ€‹

This rule reports faster config that enables rspackPersistentCache without also enabling rspackBundler.

Why this rule existsโ€‹

Docusaurus documents Rspack persistent cache as depending on the Rspack bundler.

Enabling persistent cache without the bundler makes the config internally inconsistent.

โŒ Incorrectโ€‹

export default {
future: {
faster: {
rspackPersistentCache: true,
},
},
};

โœ… Correctโ€‹

export default {
future: {
faster: {
rspackBundler: true,
rspackPersistentCache: true,
},
},
};

Behavior and migration notesโ€‹

This rule autofixes the simple static cases it can prove safely by inserting or replacing rspackBundler: true.

When not to use itโ€‹

Do not use this rule if your project intentionally keeps partially migrated faster config and you do not want linting to normalize the documented dependency yet.

Rule catalog ID: R110

Further readingโ€‹