remark-preset-lint-travi

raw JSON →
6.0.8 verified Fri May 01 auth: no javascript

remark preset configuring remark-lint with the author's Markdown style preferences. Current stable version is 6.0.8, released under MIT license. It is a shareable configuration that bundles a set of lint rules via the underlying @form8ion/remark-lint-preset. Preset releases are tightly coupled to the dependency's version, with frequent updates (multiple releases per year). Differentiator: opinionated defaults from a single maintainer, with support for ESM-only configuration files (.remarkrc.js with export default), requiring Node >=16.14.

error Error: Cannot find module 'remark-preset-lint-travi'
cause Missing or incorrect installation; missing peer dependencies.
fix
Run npm install remark remark-cli remark-preset-lint-travi --save-dev.
error Error: [unified] Cannot parse `.remarkrc.js` with function `module.exports`
cause Using CommonJS module.exports in .remarkrc.js with ESM-only preset v6+.
fix
Change .remarkrc.js to: export default { plugins: ['remark-preset-lint-travi'] }.
error TypeError: remark is not a function
cause Attempting to use the preset programmatically without importing it correctly or missing remark.
fix
Ensure remark is installed and import the preset: import remark from 'remark'; import remarkPresetLintTravi from 'remark-preset-lint-travi';
breaking Node.js v17 support dropped; minimum Node version raised to 16.14
fix Upgrade to v6.0.0+ and ensure Node >=16.14.
breaking Preset is ESM-only starting from v6. .remarkrc.js must use export default, not module.exports.
fix Convert .remarkrc.js to use export default { plugins: ['remark-preset-lint-travi'] }.
deprecated The underlying @form8ion/remark-lint-preset is not directly configurable; all rule configuration is opaque.
fix No direct fix; if you need to customize rules, consider composing a custom preset using remark-lint rules directly.
gotcha remark and remark-cli must be installed as peer dependencies; only installing the preset will not work.
fix Run npm install remark remark-cli remark-preset-lint-travi --save-dev.
gotcha The --frail flag causes remark to exit with a non-zero code on warnings, which is required for CI.
fix Always use --frail in lint scripts to ensure failures are caught.
npm install remark-preset-lint-travi
yarn add remark-preset-lint-travi
pnpm add remark-preset-lint-travi

Shows installation, configuration via .remarkrc.js, and running the linter on a sample Markdown file.

npm install remark remark-cli remark-preset-lint-travi --save-dev
echo 'export default { plugins: ["remark-preset-lint-travi"] }' > .remarkrc.js
echo '# Test
## Heading
Some text.' > test.md
npx remark --frail .