1.2.0 • Published 3 months ago

@mapbox/eslint-plugin-docs v1.2.0

Weekly downloads
57
License
ISC
Repository
github
Last release
3 months ago

eslint-plugin-docs

Eslint rules for docs.mapbox.com sites.

Rules

Install

npm install @mapbox/eslint-plugin-docs

In the eslint configuration, extend the plugin:

"extends": ["plugin:@mapbox/docs/recommended"]

Developing

To run tests:

npm test

To test eslint plugin (this will lint tests/test-code/eslint-map-wrapper-error.js):

npm run lint-map-wrapper

Use the liquid processor

To lint JavaScript fenced code blocks in markdown files, update the eslint configuration to include:

"overrides": [
    {
      "files": [
        "**/*.md"
      ],
      "processor": "@mapbox/docs/liquid"
    },
    {
      "files": [
        "**/*.md/*.js"
      ],
      // Your rules here for JavaScript
    }
  ]

Update your lint script in package.json to include: eslint --ext .md src/pages.

1.2.0

3 months ago

1.1.0

6 months ago

1.0.0

3 years ago

0.5.0-beta.1

3 years ago

0.5.0-beta.2

3 years ago

0.5.0-beta.0

3 years ago

0.4.0

3 years ago

0.4.0-markdown.0

3 years ago

0.4.0-markdown.1

3 years ago

0.4.0-markdown.2

3 years ago

0.4.0-markdown.3

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago