@mapbox/remark-lint-mapbox

remark-lint plugins that are specific to Mapbox documentation sites.

Usage no npm install needed!

<script type="module">
  import mapboxRemarkLintMapbox from 'https://cdn.skypack.dev/@mapbox/remark-lint-mapbox';
</script>

README

remark-lint-mapbox

These remark-lint plugins are specific to Mapbox documentation sites:

  • link-checker - Checks for broken links in markdown files.
  • frontmatter - Validates frontmatter of markdown pages and asserts title and description.
  • constantly - Checks markdown files for use of constants ({{constant.VERSION}}) and verifies the value exists in the site's constants.json.
  • xtreme - Parses markdown files with jsxtreme-markdown and eslint to find unresolved import paths and undeclared variables.
  • a11y - Checks markdown for missing title (DemoIframe component and iframe element) and alt (AppropriateImage component and img element) attributes.

How to release

From the main branch:

  1. If you haven't already, update CHANGELOG.md to describe the changes, commit, and push.
  2. Run npm version {major|minor|patch}. Example (and usually): npm version minor.
  3. Push changes.
  4. Run mbx npm publish to publish the package to npm.

remark-config-docs helps manage this package throughout our documentation repositories. After you create a remark-lint-mapbox release, you have two options to start using the latest version:

  1. I need the version now! In the site repository run, npm i @mapbox/remark-lint-mapbox@latest --force.
  2. I don't need the version for another 2+ days. Dependabot will help with the release: within 24 hours, dependabot will automatically update remark-config-docs. After a docs team member merges and releases a new remark-config-docs version, dependabot will (within another 24 hours) update all sites with the latest version of remark-config-docs (and the latest version of remark-lint-mapbox).