Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remark-lint-checkbox-character-style

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-lint-checkbox-character-style

remark-lint rule to warn when list item checkboxes violate a given style

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
71K
decreased by-7.42%
Maintainers
1
Weekly downloads
 
Created
Source

remark-lint-checkbox-character-style

Warn when list item checkboxes violate a given style.

The default value, consistent, detects the first used checked and unchecked checkbox styles, and will warn when a subsequent checkboxes use a different style.

These values can also be passed in as an object, such as:

{checked: 'x', unchecked: ' '}

Install

npm install --save remark-lint-checkbox-character-style

Example

When this rule is { checked: 'x' }, the following file valid.md is ok:

<!--This file is also valid by default-->

- [x] List item
- [x] List item

When this rule is { checked: 'X' }, the following file valid.md is ok:

<!--This file is also valid by default-->

- [X] List item
- [X] List item

When this rule is { unchecked: ' ' }, the following file valid.md is ok:

<!--This file is also valid by default-->

- [ ] List item
- [ ] List item
- [ ]··
- [ ]

When this rule is { unchecked: '\t' }, the following file valid.md is ok:

<!--Also valid by default (note: `»` represents `\t`)-->

- [»] List item
- [»] List item

When this rule is turned on, the following file invalid.md is not ok:

<!--Note: `»` represents `\t`-->

- [x] List item
- [X] List item
- [ ] List item
- [»] List item
4:4-4:5: Checked checkboxes should use `x` as a marker
6:4-6:5: Unchecked checkboxes should use ` ` as a marker

When { unchecked: '!' } is passed in, the following error is given:

1:1: Invalid unchecked checkbox marker `!`: use either `'\t'`, or `' '`

When { checked: '!' } is passed in, the following error is given:

1:1: Invalid checked checkbox marker `!`: use either `'x'`, or `'X'`

License

MIT © Titus Wormer

Keywords

FAQs

Package last updated on 23 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc