remark-lint-checkbox-content-indent
    TypeScript icon, indicating that this package has built-in type declarations

    4.1.0 • Public • Published

    remark-lint-checkbox-content-indent

    Build Coverage Downloads Size Sponsors Backers Chat

    Warn when list item checkboxes are followed by too much whitespace.

    Presets

    This rule is not included in any default preset

    Example

    ok.md
    In

    Note: this example uses GFM.

    - [ ] List item
    +  [x] List Item
    *   [X] List item
    -    [ ] List item
    Out

    No messages.

    not-ok.md
    In

    Note: this example uses GFM.

    - [ ] List item
    + [x]  List item
    * [X]   List item
    - [ ]    List item
    Out
    2:7-2:8: Checkboxes should be followed by a single character
    3:7-3:9: Checkboxes should be followed by a single character
    4:7-4:10: Checkboxes should be followed by a single character
    

    Install

    This package is ESM only: Node 12+ is needed to use it and it must be importeded instead of requiredd.

    npm:

    npm install remark-lint-checkbox-content-indent

    This package exports no identifiers. The default export is remarkLintCheckboxContentIndent.

    Use

    You probably want to use it on the CLI through a config file:

     …
     "remarkConfig": {
       "plugins": [
         …
         "lint",
    +    "lint-checkbox-content-indent",
         …
       ]
     }
     …

    Or use it on the CLI directly

    remark -u lint -u lint-checkbox-content-indent readme.md

    Or use this on the API:

     import {remark} from 'remark'
     import {reporter} from 'vfile-reporter'
     import remarkLint from 'remark-lint'
     import remarkLintCheckboxContentIndent from 'remark-lint-checkbox-content-indent'
    
     remark()
       .use(remarkLint)
    +  .use(remarkLintCheckboxContentIndent)
       .process('_Emphasis_ and **importance**')
       .then((file) => {
         console.error(reporter(file))
       })

    Contribute

    See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

    This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

    License

    MIT © Titus Wormer

    Install

    npm i remark-lint-checkbox-content-indent

    DownloadsWeekly Downloads

    9,217

    Version

    4.1.0

    License

    MIT

    Unpacked Size

    8.1 kB

    Total Files

    4

    Last publish

    Collaborators

    • johno
    • wooorm