1.2.0 • Published 2 years ago
@mapbox/eslint-plugin-docs v1.2.0
eslint-plugin-docs
Eslint rules for docs.mapbox.com sites.
Rules
Install
npm install @mapbox/eslint-plugin-docsIn the eslint configuration, extend the plugin:
"extends": ["plugin:@mapbox/docs/recommended"]Developing
To run tests:
npm testTo test eslint plugin (this will lint tests/test-code/eslint-map-wrapper-error.js):
npm run lint-map-wrapperUse 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
2 years ago
1.1.0
2 years ago
1.0.0
4 years ago
0.5.0-beta.1
4 years ago
0.5.0-beta.2
4 years ago
0.5.0-beta.0
4 years ago
0.4.0
5 years ago
0.4.0-markdown.0
5 years ago
0.4.0-markdown.1
5 years ago
0.4.0-markdown.2
5 years ago
0.4.0-markdown.3
5 years ago
0.3.0
5 years ago
0.2.0
5 years ago