
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@textlint/kernel
Advanced tools
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 with npm:
npm install @textlint/kernel
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.
@textlint/kernel
export core types of textlint.
If you use TypeScript, this types help you.
// 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";
See Releases page.
Install devDependencies and Run npm test
:
npm i -d && npm test
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
MIT © azu
FAQs
textlint kernel is core logic by pure JavaScript.
The npm package @textlint/kernel receives a total of 74,759 weekly downloads. As such, @textlint/kernel popularity was classified as popular.
We found that @textlint/kernel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.