@mapbox/stylelint-processor-markdown

0.5.0 • Public • Published

stylelint-processor-markdown

Build Status

A stylelint processor for using stylelint on GFM fenced code blocks in Markdown.

Uses remark to parse the Markdown.

Install

npm install @mapbox/stylelint-processor-markdown

Options

syntax

Type: String, Default: 'css'

Specify the language for code blocks that will be sent through stylelint.

By default, this module looks for CSS blocks. If you would like to lint another syntax supported by stylelint, change this option to match the code blocks language (e.g. to 'scss' for ```scss blocks) and make sure you tell stylelint about your non-standard syntax when you run it.

If you have one Markdown file with code blocks of multiple syntaxes, you'll need to lint it multiple times, once for each syntax.

Caveats

Do not use this processor with the no-empty-source rule. If you do, you will have warnings whenever a markdown file does not contain any stylesheet blocks.

/@mapbox/stylelint-processor-markdown/

    Package Sidebar

    Install

    npm i @mapbox/stylelint-processor-markdown

    Weekly Downloads

    37

    Version

    0.5.0

    License

    MIT

    Unpacked Size

    14.7 kB

    Total Files

    15

    Last publish

    Collaborators

    • mbx-npm-ci-production
    • mbx-npm-ci-staging
    • mbx-npm-advanced-actions-production
    • mbx-npm-advanced-actions-staging
    • mbx-npm-09-production
    • mbx-npm-08-production
    • mbx-npm-07-production
    • mbx-npm-06-production
    • mbx-npm-05-production
    • mbx-npm-04-production
    • mbx-npm-03-production
    • mbx-npm-02-production
    • mbx-npm-01-production
    • mbx-npm-02-staging
    • mapbox-npm-01
    • mapbox-npm-02
    • mapbox-npm-07
    • mapbox-npm-03
    • mapbox-npm-04
    • mapbox-npm-09
    • mapbox-npm-05
    • mapbox-npm-06
    • mapbox-npm-08
    • mapbox-npm-advanced-actions
    • mapbox-npm-ci
    • mapbox-npm
    • mapbox-admin
    • mapbox-machine-user