Getting started
Install faircopy and run your first lint.
Install
npm install -D faircopy @faircopy/rules-nlp
The faircopy meta-package pulls in the CLI, core engine, default rules, and config helper. Add @faircopy/rules-nlp when you want semantic checks such as passive voice and filter words.
Add a config
Create faircopy.config.ts at the project root.
import { astro } from '@faircopy/astro'
import { defineConfig } from '@faircopy/config'
export default defineConfig({
files: ['src/**/*.astro'],
adapters: [astro()],
rules: {
'no-em-dash': 'error',
'no-weasel-words': 'error',
'no-rhetorical-scaffolding': 'error',
'no-filter-words': 'error',
'no-passive-voice': 'warn',
},
})
Swap the adapter for your framework. See adapters for Astro, React, and Solid.
Lint
npx faircopy lint
faircopy prints each violation with the file path, line number, rule ID, and the reason. Fix the copy, run again, ship with fewer writing tells.
The default regex rules stay fast and always-on. The NLP rules are opt-in, which keeps the base install lean for projects that do not need semantic analysis.
Next steps
- Rules reference
- Claude Code plugin to block turn-end on lint errors
- Framework adapters