textlint

  • Version 15.0.1
  • Published
  • 220 kB
  • 26 dependencies
  • MIT license

Install

npm i textlint
yarn add textlint
pnpm add textlint

Overview

The pluggable linting tool for natural language.

Index

Variables

variable cli

const cli: {
execute(args: string | Array<string>, text?: string): Promise<number>;
executeWithOptions(executeOptions: ExecuteOptions): Promise<number>;
};
  • Encapsulates all CLI behavior for eslint. Makes it easier to test as well as for other Node.js programs to effectively run the CLI.

Functions

function createLinter

createLinter: (options: CreateLinterOptions) => {
lintFiles(filesOrGlobs: string[]): Promise<TextlintResult[]>;
lintText(text: string, filePath: string): Promise<TextlintResult>;
fixFiles(fileOrGlobs: string[]): Promise<TextlintFixResult[]>;
fixText(text: string, filePath: string): Promise<TextlintFixResult>;
scanFilePath(filePath: string): Promise<ScanFilePathResult>;
};

    function loadTextlintrc

    loadTextlintrc: (
    options?: LoadTextlintrcOptions
    ) => Promise<TextlintKernelDescriptor>;

      Type Aliases

      type CreateLinterOptions

      type CreateLinterOptions = {
      descriptor: TextlintKernelDescriptor;
      ignoreFilePath?: string;
      quiet?: boolean;
      cache?: boolean;
      cacheLocation?: string;
      /**
      * The current working directory
      */
      cwd?: string;
      };

        type LoadTextlintrcOptions

        type LoadTextlintrcOptions = {
        /**
        * config file path
        * /path/to/.textlintrc
        */
        configFilePath?: string;
        /**
        * custom node_modules directory
        */
        node_modulesDir?: string;
        };

          Package Files (4)

          Dependencies (26)

          Dev Dependencies (16)

          Peer Dependencies (0)

          No peer dependencies.

          Badge

          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/textlint.

          • Markdown
            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/textlint)
          • HTML
            <a href="https://www.jsdocs.io/package/textlint"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>