![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
remark-preset-lint-recommended
Advanced tools
remark preset to configure remark-lint with rules that prevent mistakes or stuff that fails across vendors.
The remark-preset-lint-recommended package is a preset configuration for remark-lint, a tool used to lint Markdown files. It includes a set of recommended rules to ensure consistent and error-free Markdown content.
Linting for Markdown
This configuration file sets up remark-lint with the recommended preset. It ensures that your Markdown files adhere to a set of best practices and common standards.
module.exports = {
"plugins": [
["remark-lint", [
require("remark-preset-lint-recommended")
]]
]
};
Integration with remark
This code demonstrates how to integrate the recommended linting rules directly into a remark processing pipeline. It processes a Markdown string and applies the linting rules.
const remark = require('remark');
const recommended = require('remark-preset-lint-recommended');
remark()
.use(recommended)
.process('# Hello world!', function (err, file) {
if (err) throw err;
console.log(String(file));
});
remark-lint is the core linter for Markdown files. It provides the base functionality for linting and can be extended with various plugins, including remark-preset-lint-recommended. It is more flexible but requires manual configuration of rules.
remark-preset-lint-consistent is another preset for remark-lint that focuses on consistent Markdown formatting. It includes a different set of rules compared to remark-preset-lint-recommended, aimed at ensuring uniformity in Markdown files.
remark-preset-lint-markdown-style-guide is a preset that enforces the rules defined by the Markdown style guide. It is more opinionated and comprehensive compared to remark-preset-lint-recommended, making it suitable for projects that follow the style guide strictly.
Preset of remark-lint
rules to warn for likely problems.
This package is a preset containing remark-lint
rules.
Lint rules check markdown code style.
You can use this package to check that markdown follows some best practices.
This preset includes the following plugins:
This package is ESM only. In Node.js (version 16+), install with npm:
npm install remark-preset-lint-recommended
In Deno with esm.sh
:
import remarkPresetLintRecommended from 'https://esm.sh/remark-preset-lint-recommended@7'
In browsers with esm.sh
:
<script type="module">
import remarkPresetLintRecommended from 'https://esm.sh/remark-preset-lint-recommended@7?bundle'
</script>
On the API:
import remarkParse from 'remark-parse'
import remarkPresetLintRecommended from 'remark-preset-lint-recommended'
import remarkStringify from 'remark-stringify'
import {read} from 'to-vfile'
import {unified} from 'unified'
import {reporter} from 'vfile-reporter'
const file = await read('example.md')
await unified()
.use(remarkParse)
.use(remarkPresetLintRecommended)
.use(remarkStringify)
.process(file)
console.error(reporter(file))
On the CLI:
remark --frail --use remark-preset-lint-recommended .
On the CLI in a config file (here a package.json
):
…
"remarkConfig": {
"plugins": [
…
+ "remark-preset-lint-recommended",
…
]
}
…
This package exports no identifiers.
It exports no additional TypeScript types.
The default export is
remarkPresetLintRecommended
.
unified().use(remarkPresetLintRecommended)
Check that markdown follows some best practices.
You can reconfigure rules in the preset by using them afterwards with different options.
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-preset-lint-recommended@7
,
compatible with Node.js 16.
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.
FAQs
remark preset to configure remark-lint with rules that prevent mistakes or stuff that fails across vendors.
We found that remark-preset-lint-recommended demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.