Installations
npm install remark-lint-checkbox-character-style
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
23.1.0
NPM Version
11.0.0
Releases
10.0.1
Published on 27 Jan 2025
remark-lint-table-cell-padding@5.1.0
Published on 27 Jan 2025
remark-lint-table-pipe-alignment@4.1.0
Published on 27 Jan 2025
remark-lint-maximum-line-length@4.1.0
Published on 27 Jan 2025
remark-lint-maximum-heading-length@4.1.0
Published on 27 Jan 2025
remark-lint-directive-unique-attribute-name@1.0.0
Published on 27 Jan 2025
Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
8,774,871
Last Day
9,000
Last Week
62,158
Last Month
316,870
Last Year
3,502,029
GitHub Statistics
959 Stars
621 Commits
131 Forks
18 Watching
1 Branches
53 Contributors
Bundle Size
5.49 kB
Minified
2.21 kB
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
5.0.1
Package Id
remark-lint-checkbox-character-style@5.0.1
Unpacked Size
19.59 kB
Size
5.25 kB
File Count
5
NPM Version
11.0.0
Node Version
23.1.0
Publised On
27 Jan 2025
Total Downloads
Cumulative downloads
Total Downloads
8,774,871
Last day
-49.1%
9,000
Compared to previous day
Last week
-30.7%
62,158
Compared to previous week
Last month
-6.3%
316,870
Compared to previous month
Last year
105.1%
3,502,029
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
remark-lint-checkbox-character-style
remark-lint
rule to warn when list item checkboxes violate a given
style.
Contents
- What is this?
- When should I use this?
- Presets
- Install
- Use
- API
- Recommendation
- Fix
- Examples
- Compatibility
- Contribute
- License
What is this?
This package checks the character used in checkboxes.
When should I use this?
You can use this package to check that the style of GFM tasklists is
consistent.
Task lists are a GFM feature enabled with
remark-gfm
.
Presets
This plugin is included in the following presets:
Preset | Options |
---|---|
remark-preset-lint-consistent | 'consistent' |
Install
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install remark-lint-checkbox-character-style
In Deno with esm.sh
:
1import remarkLintCheckboxCharacterStyle from 'https://esm.sh/remark-lint-checkbox-character-style@5'
In browsers with esm.sh
:
1<script type="module"> 2 import remarkLintCheckboxCharacterStyle from 'https://esm.sh/remark-lint-checkbox-character-style@5?bundle' 3</script>
Use
On the API:
1import remarkLint from 'remark-lint' 2import remarkLintCheckboxCharacterStyle from 'remark-lint-checkbox-character-style' 3import remarkParse from 'remark-parse' 4import remarkStringify from 'remark-stringify' 5import {read} from 'to-vfile' 6import {unified} from 'unified' 7import {reporter} from 'vfile-reporter' 8 9const file = await read('example.md') 10 11await unified() 12 .use(remarkParse) 13 .use(remarkLint) 14 .use(remarkLintCheckboxCharacterStyle) 15 .use(remarkStringify) 16 .process(file) 17 18console.error(reporter(file))
On the CLI:
1remark --frail --use remark-lint --use remark-lint-checkbox-character-style .
On the CLI in a config file (here a package.json
):
1 … 2 "remarkConfig": { 3 "plugins": [ 4 … 5 "remark-lint", 6+ "remark-lint-checkbox-character-style", 7 … 8 ] 9 } 10 …
API
This package exports no identifiers.
It exports the TypeScript types
Options
and
Styles
.
The default export is
remarkLintCheckboxCharacterStyle
.
unified().use(remarkLintCheckboxCharacterStyle[, options])
Warn when list item checkboxes violate a given style.
Parameters
options
(Options
, default:'consistent'
) — either preferred values or whether to detect the first styles and warn for further differences
Returns
Transform (Transformer
from unified
).
Options
Configuration (TypeScript type).
Type
1type Options = Styles | 'consistent'
Styles
Styles (TypeScript type).
Fields
checked
('X'
,'x'
, or'consistent'
, default:'consistent'
) — preferred style to use for checked checkboxesunchecked
('␉'
(a tab),'␠'
(a space), or'consistent'
, default:'consistent'
) — preferred style to use for unchecked checkboxes
Recommendation
It’s recommended to set options.checked
to 'x'
(a lowercase X) as it
prevents an extra keyboard press and options.unchecked
to '␠'
(a space)
to make all checkboxes align.
Fix
remark-stringify
formats checked checkboxes
using 'x'
(lowercase X) and unchecked checkboxes using '␠'
(a space).
Examples
ok-x.md
When configured with { checked: 'x' }
.
In
👉 Note: this example uses GFM (
remark-gfm
).
1- [x] Mercury. 2- [x] Venus.
Out
No messages.
ok-x-upper.md
When configured with { checked: 'X' }
.
In
👉 Note: this example uses GFM (
remark-gfm
).
1- [X] Mercury. 2- [X] Venus.
Out
No messages.
ok-space.md
When configured with { unchecked: ' ' }
.
In
👉 Note: this example uses GFM (
remark-gfm
).
1- [ ] Mercury. 2- [ ] Venus. 3- [ ]␠␠ 4- [ ]
Out
No messages.
ok-tab.md
When configured with { unchecked: '\t' }
.
In
👉 Note: this example uses GFM (
remark-gfm
).
1- [␉] Mercury. 2- [␉] Venus.
Out
No messages.
not-ok-default.md
In
👉 Note: this example uses GFM (
remark-gfm
).
1- [x] Mercury. 2- [X] Venus. 3- [ ] Earth. 4- [␉] Mars.
Out
12:5: Unexpected checked checkbox value `X`, expected `x` 24:5: Unexpected unchecked checkbox value `\t`, expected ` `
not-ok-option.md
When configured with '🌍'
.
Out
11:1: Unexpected value `🌍` for `options`, expected an object or `'consistent'`
not-ok-option-unchecked.md
When configured with { unchecked: '🌍' }
.
Out
11:1: Unexpected value `🌍` for `options.unchecked`, expected `'\t'`, `' '`, or `'consistent'`
not-ok-option-checked.md
When configured with { checked: '🌍' }
.
Out
11:1: Unexpected value `🌍` for `options.checked`, expected `'X'`, `'x'`, or `'consistent'`
Compatibility
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
remark-lint-checkbox-character-style@5
,
compatible with Node.js 16.
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
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/remarkjs/.github/security.md:1
- Info: Found linked content: github.com/remarkjs/.github/security.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/remarkjs/.github/security.md:1
- Info: Found text in security policy: github.com/remarkjs/.github/security.md:1
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/bb.yml:1
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/bb.yml:5: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-lint/bb.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:6: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-lint/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-lint/main.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/remarkjs/remark-lint/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:11
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Score
5
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More