Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
remark-lint-ordered-list-marker-value
Advanced tools
remark-lint rule to warn when the marker value of ordered lists violates a given style
The remark-lint-ordered-list-marker-value package is a plugin for remark-lint that enforces consistent marker values in ordered lists. It helps maintain a uniform style in Markdown documents by ensuring that ordered list markers follow a specified pattern.
Consistent Ordered List Marker Values
This feature ensures that ordered list markers are in a consistent order. For example, if the first item is '1.', the second item should be '2.', and so on. The 'ordered' option enforces this rule.
module.exports = {
plugins: [
['remark-lint-ordered-list-marker-value', 'ordered']
]
};
Enforce Specific Marker Value
This feature enforces that all ordered list markers use the value '1.'. This can be useful for lists where the actual order is not important, but consistency is.
module.exports = {
plugins: [
['remark-lint-ordered-list-marker-value', 'one']
]
};
remark-lint is a general-purpose Markdown linter that provides a wide range of rules for ensuring consistent and error-free Markdown documents. While remark-lint-ordered-list-marker-value focuses specifically on ordered list markers, remark-lint offers a broader set of rules for various aspects of Markdown formatting.
markdownlint is a Node.js style checker and lint tool for Markdown files. It provides a comprehensive set of rules for maintaining consistent Markdown style, including rules for ordered list markers. It is similar to remark-lint but is a standalone tool rather than a plugin.
markdown-it is a Markdown parser that can be extended with plugins to enforce various rules and styles. While it is primarily a parser, it can be used with plugins to achieve similar functionality to remark-lint-ordered-list-marker-value, such as enforcing consistent ordered list markers.
Warn when the list-item marker values of ordered lists violate a given style.
Options: string
, either 'single'
, 'one'
, or 'ordered'
,
default: 'ordered'
.
When set to 'ordered'
, list-item bullets should increment by one,
relative to the starting point. When set to 'single'
, bullets should
be the same as the relative starting point. When set to 'one'
, bullets
should always be 1
.
npm install --save remark-lint-ordered-list-marker-value
When this rule is turned on, the following file
valid.md
is ok:
The default value is `ordered`, so unless changed, the below
is OK.
1. Foo
2. Bar
3. Baz
Paragraph.
3. Alpha
4. Bravo
5. Charlie
Unordered lists are not affected by this rule.
* Anton
When this rule is 'one'
, the following file
valid.md
is ok:
1. Foo
1. Bar
1. Baz
Paragraph.
1. Alpha
1. Bravo
1. Charlie
When this rule is 'one'
, the following file
invalid.md
is not ok:
1. Foo
2. Bar
2:1-2:8: Marker should be `1`, was `2`
When this rule is 'single'
, the following file
valid.md
is ok:
1. Foo
1. Bar
1. Baz
Paragraph.
3. Alpha
3. Bravo
3. Charlie
When this rule is 'ordered'
, the following file
valid.md
is ok:
1. Foo
2. Bar
3. Baz
Paragraph.
3. Alpha
4. Bravo
5. Charlie
When this rule is 'ordered'
, the following file
invalid.md
is not ok:
1. Foo
1. Bar
2:1-2:8: Marker should be `2`, was `1`
When 'invalid'
is passed in, the following error is given:
1:1: Invalid ordered list-item marker value `invalid`: use either `'ordered'` or `'one'`
FAQs
remark-lint rule to warn when the marker value of ordered lists violates a given style
The npm package remark-lint-ordered-list-marker-value receives a total of 98,215 weekly downloads. As such, remark-lint-ordered-list-marker-value popularity was classified as popular.
We found that remark-lint-ordered-list-marker-value demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.