This package contains configuration for remark-lint to lint markdown code styles. It bundles standard presets and sets some opinionated rules.. It is used by @davidsneighbour to lint markdown files in all projects.
Method 1: add it as JSON structure in .remarkrc
at the root of your project:
{
"plugins": ["@davidsneighbour/remark-config"]
}
Method 2: add it as a configuration object under remarkConfig
in package.json
:
{
"remarkConfig": {
"plugins": ["@davidsneighbour/remark-config"]
}
}
Method 3: add it as a JavaScript object in .remarkrc.js
at the root of your project. This package is ESM only now:
import defaultRemarkConfig from "@davidsneighbour/remark-config";
const localRemarkConfig = [
// add your changes here
];
const mergedConfiguration = {
...defaultRemarkConfig,
...localRemarkConfig,
};
export default mergedConfiguration;
Or without changes:
import defaultRemarkConfig from "@davidsneighbour/remark-config";
export default defaultRemarkConfig;
The davidsneighbour
ruleset for remark-lint
uses the following two presets:
remark-preset-lint-styleguide
- a preset to maintain good quality readable markdown files.remark-preset-lint-consistent
- a preset that enforces consistency and helps avoid common known pitfalls in markdown parsers (consistency rules may override the styleguide rules).
The following plugins are added:
- remark-frontmatter to support frontmatter in markdown files
The following rules have different settings than the presets:
- remark-lint-linebreak-style - prefer unix linebreak
\n
. - remark-lint-maximum-line-length - removes any limit to line length.
- remark-lint-no-file-name-irregular-characters - lint filenames for irregular characters.
"scripts": {
"lint:remark": "remark",
"lint:remark2": "remark ."
}
Configurations | ||
---|---|---|
Build Tools | ||
Babel | Webpack | |
Testing | ||
Cypress | HTML Validate | |
Linters and Formatters | ||
Browserslist | ESLint | PostCSS |
Prettier | Stylelint | |
Project Management | ||
Commitlint | Release | |
Markdown and Writing | ||
Markdownlint | Remark Lint | |
Other Tools | ||
Bootstrap | Tools |