@quartzds/retext-preset
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

@quartzds/retext-preset

NPM Package License

Shareable retext preset for Quartz design system packages.

💿 Installation

npm install --save-dev @quartzds/retext-preset

📖 Usage

import { retext } from 'retext'
import retextPresetQuartz from '@quartzds/retext-preset'
import reporter from 'vfile-reporter'

const file = await retext()
  .use(retextPresetQuartz)
  .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

🔧 Configuration

@quartzds/retext-preset searches up the directory hierarchy for the following files:

  • .config/quartzretextrc.cjs
  • .config/quartzretextrc.js
  • .config/quartzretextrc.json
  • .config/quartzretextrc.yaml
  • .config/quartzretextrc.yml
  • .config/quartzretextrc
  • .quartzretextrc.cjs
  • .quartzretextrc.js
  • .quartzretextrc.json
  • .quartzretextrc.yaml
  • .quartzretextrc.yml
  • .quartzretextrc
  • package.json
  • quartzretext.config.cjs
  • quartzretext.config.js

When searching package.json files, the quartzretext property will be loaded. See the cosmiconfig documentation for more details about configuration resolution.

The configuration loaded is expected to contain only the following options:

export type PresetConfig = {
  spell: {
    dictionary: Dictionary
    ignore: string[]
    ignoreDigits: boolean
    ignoreLiteral: boolean
    max: number
    personal: string | Uint8Array
  }
  simplify: {
    ignore: string[]
  }
}

See the retext-spell and retext-simplify documentation for more information about these options.

⚖️ License

See the LICENSE file for license rights and limitations.

Readme

Keywords

none

Package Sidebar

Install

npm i @quartzds/retext-preset

Weekly Downloads

6

Version

1.1.1

License

LGPL-2.1-only

Unpacked Size

10.9 kB

Total Files

9

Last publish

Collaborators

  • quartzds-bot
  • quartzfm