npm.io
0.1.1 • Published 3d ago

writinglint-core

Licence
MIT
Version
0.1.1
Deps
0
Size
66 kB
Vulns
0
Weekly
0

writinglint-core

The engine behind WritingLint: a Document model over a dependency-parse + POS graph, an authorable Rule API (defineRule), config resolution, and the Linter. Bring your own parser (e.g. writinglint-parser-node).

import { Linter, resolveConfig } from 'writinglint-core';
import { loadParser } from 'writinglint-parser-node';
import { recommended } from 'writinglint-rulepack-ai-style';

const linter = new Linter(await loadParser({ modelDir: './models/xsmall' }));
const { lints } = await linter.lint('Trust the graph, not the vibes.', resolveConfig(recommended));

See the docs for the full API.

Keywords