Skip to content

Available Rules

The --fix option on the command line automatically fixes problems reported by rules which have a wrench 🔧 below.
The rules with the following star ⭐ are included in the plugin.configs.recommended config.

Module Interop Rules

Rule IDDescriptionFixableRECOMMENDED
module-interop/no-import-cjsdisallow importing CommonJS modules
module-interop/no-require-esmdisallow require(esm)
module-interop/prefer-json-modulesenforce json imports to have the {type: "json"} attribute.