Socket
Book a DemoInstallSign in
Socket

@textlint/linter-formatter

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@textlint/linter-formatter

textlint output formatter

15.2.2
latest
Source
npmnpm
Version published
Weekly downloads
369K
-2.66%
Maintainers
2
Weekly downloads
 
Created
Source

@textlint/linter-formatter

textlint output formatter.

Installation

npm install @textlint/linter-formatter

Usage

See formatters/.

Currently, you can use "stylish" (defaults), "checkstyle", "compact", "jslint-xml", "json", "junit", "pretty-error", "table", "tap", and "unix".

const { loadFormatter } = require("@textlint/linter-formatter");
const formatter = await loadFormatter({
    formatterName: "stylish"
});
const output = formatter.format([
    {
        filePath: "./README.md",
        messages: [
            {
                ruleId: "semi",
                line: 1,
                column: 23,
                message: "Expected a semicolon."
            }
        ]
    }
]);
console.log(output);
/*
./README.md
  1:23  warning  Expected a semicolon  semi

✖ 1 problem (0 errors, 1 warning)
*/

API

export declare type FormatterConfig = {
    color?: boolean;
    formatterName: string;
};
export interface FormatterDetail {
    name: string;
}
export declare function getFormatterList(): FormatterDetail[];

CLI

$ textlint -f json README.md --rule no-todo | textlint-formatter -f pretty-error --stdin

Other formatter

Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request :D

License

MIT

FAQs

Package last updated on 20 Aug 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.