@quartzds/remark-preset
Shareable remark preset for Quartz design system packages.
💿 Installation
npm install --save-dev @quartzds/remark-preset
📖 Usage
Below are some common ways to get started.
CLI
Install remark-cli
:
npm install --save-dev remark-cli
Add the following configuration to package.json
:
/* ... */
"remarkConfig": {
"plugins": [
"@quartzds/remark-preset"
]
},
/* ... */
Then add an NPM script to package.json
:
/* ... */
"scripts": {
/* ... */
"check": "remark . --quiet --frail",
/* ... */
},
/* ... */
API
import { remark } from 'remark'
import remarkPresetQuartz from '@quartzds/remark-preset'
import { reporter } from 'vfile-reporter'
const file = await remark()
.use(remarkPresetQuartz)
.process('This and and that.')
console.error(reporter(file))
Yields:
1:6-1:13 warning Expected `and` once, not twice and retext-repeated-words
⚠ 1 warning
Refer to the remark examples documentation for more information.
⚖️ License
See the LICENSE file for license rights and limitations.