Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 878 Bytes

README.md

File metadata and controls

56 lines (39 loc) · 878 Bytes

@docusaurus/eslint-plugin

Docusaurus specific linting rules for eslint

Installation

You'll first need to install ESLint:

npm i -D eslint

Next, install @docusaurus/eslint-plugin:

npm i -D @docusaurus/eslint-plugin

Usage

Add @docusaurus to the plugins section of your .eslintrc configuration file:

{
  "plugins": ["@docusaurus"]
}

Then, you can extend one of the configs (e.g. the recommended config):

{
  "extends": ["plugin:@docusaurus/recommended"]
}

For more fine-grained control, you can also configure the rules you want to use:

{
  "rules": {
    "@docusaurus/no-dynamic-i18n-messages": "error",
    "@docusaurus/no-untranslated-text": "warn"
  }
}

Supported Configs

  • recommended
  • all

Supported Rules

  • no-dynamic-i18n-messages
  • no-untranslated-text