# @textlint/kernel

> textlint kernel is core logic by pure JavaScript.

Latest version **15.8.0** (published 2026-08-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @textlint/kernel
pnpm add @textlint/kernel
yarn add @textlint/kernel
bun add @textlint/kernel
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 15.8.0 |
| Published | 2026-08-01 |
| First published | 2017-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 397.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 3181 |
| Author | azu |
| Maintainers | azu, textlint-user |
| Keywords | textlint |

## Links

- npm: https://www.npmjs.com/package/@textlint/kernel
- Repository: https://github.com/textlint/textlint
- Homepage: https://github.com/textlint/textlint/tree/master/packages/@textlint/textlint-kernel/
- Issues: https://github.com/textlint/textlint/issues
- npm.io page: https://npm.io/package/@textlint/kernel

## Dependencies (10)

- [debug](https://npm.io/package/debug.md) ^4.4.3
- [fast-equals](https://npm.io/package/fast-equals.md) ^4.0.3
- [@textlint/types](https://npm.io/package/@textlint/types.md) 15.8.0
- [@textlint/utils](https://npm.io/package/@textlint/utils.md) 15.8.0
- [structured-source](https://npm.io/package/structured-source.md) ^4.0.0
- [@textlint/ast-tester](https://npm.io/package/@textlint/ast-tester.md) 15.8.0
- [@textlint/ast-traverse](https://npm.io/package/@textlint/ast-traverse.md) 15.8.0
- [@textlint/feature-flag](https://npm.io/package/@textlint/feature-flag.md) 15.8.0
- [@textlint/ast-node-types](https://npm.io/package/@textlint/ast-node-types.md) 15.8.0
- [@textlint/source-code-fixer](https://npm.io/package/@textlint/source-code-fixer.md) 15.8.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 15.8.0 (latest) — 2026-08-01
- 13.4.2-next.0 (next) — 2024-02-02
- 12.0.0-beta.3 (beta) — 2021-05-24
- 2.1.0-alpha.0f2fd6f9 (canary) — 2018-07-16
- 15.7.1 — 2026-05-18
- 15.7.0 — 2026-05-14
- 15.6.1 — 2026-05-11
- 15.6.0 — 2026-04-26
- 15.5.4 — 2026-04-09
- 15.5.2 — 2026-02-21
- 15.5.1 — 2026-01-19
- 15.5.0 — 2025-12-07
- 15.4.1 — 2025-12-03
- 15.4.0 — 2025-11-17
- 15.3.0 — 2025-11-10
- … 117 more at https://npm.io/package/@textlint/kernel/versions

## README

# @textlint/kernel

textlint kernel is core logic by pure JavaScript.

This module is a low layer of textlint.

No plugin, No rule, No filter rule by default.

## Install

Install with [npm](https://www.npmjs.com/):

    npm install @textlint/kernel

## Usage

```js
import { TextlintKernel } from "@textlint/kernel";
const kernel = new TextlintKernel();
const options = {
    filePath: "/path/to/file.md",
    ext: ".md",
    plugins: [
        {
            pluginId: "markdown",
            plugin: require("@textlint/textlint-plugin-markdown")
        }
    ],
    rules: [
        {
            ruleId: "no-todo",
            rule: require("textlint-rule-no-todo").default
        }
    ]
};
kernel.lintText("TODO: text", options).then(result => {
    assert.ok(typeof result.filePath === "string");
    assert.ok(result.messages.length === 1);
});
```

Notes: Preset is a collection of Rules.
Currently, `presets` option does not exist.

## Type Interface

`@textlint/kernel` export core types of textlint.

If you use TypeScript, this types help you.

```ts
// Types
import {
    TextlintResult,
    TextlintFixResult,
    TextlintFixCommand,
    TextlintMessage,
    // Kernel rule/filter/plugin format
    TextlintKernelRule,
    TextlintKernelFilterRule,
    TextlintKernelPlugin,
    // textlint rule interface
    TextlintRuleCreator,
    TextlintRuleOptions,
    // textlint filter rule interface
    TextlintFilterRuleCreator,
    TextlintFilterRuleOptions,
    // textlint plugin interface
    TextlintPluginCreator,
    TextlintPluginOptions,
    TextlintPluginProcessor,
    TextlintPluginProcessorConstructor
} from "@textlint/kernel";
```

## Changelog

See [Releases page](https://github.com/textlint/textlint/releases).

## Running tests

Install devDependencies and Run `npm test`:

    npm i -d && npm test

## Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, [please create an issue](https://github.com/textlint/textlint/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)

## License

MIT © azu

---
_Source: https://npm.io/package/@textlint/kernel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
