textlint-plugin-html
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

textlint-plugin-html Actions Status: test

Add HTML support for textlint.

What is textlint plugin? Please see https://github.com/textlint/textlint/blob/master/docs/plugin.md

Installation

npm install textlint-plugin-html

Requirements:

  • textlint v13+

Default supported extensions

  • .html
  • .htm

Usage

Manually add text plugin to do following:

{
    "plugins": [
        "html"
    ]
}

Lint HTML file with textlint

$ textlint index.html

Options

  • extensions: string[]
    • Additional file extensions for html

For example, if you want to treat .custom-ext as html, put following config to .textlintrc

{
   "plugins": {
       "html": {
           "extensions": [".custom-ext"]
       }
   }
}

Tests

npm test

Development

If you update snapshot, please run npm run updateSnapshot.

Add new test case

  1. add new fixture file to test/ast-test-case/<test-case-name>/index.html
  2. npm run updateSnapshot
  3. check outputs

Contributing

  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

License

MIT

/textlint-plugin-html/

    Package Sidebar

    Install

    npm i textlint-plugin-html

    Weekly Downloads

    4,957

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    30.1 kB

    Total Files

    23

    Last publish

    Collaborators

    • textlint-user
    • azu
    • 0x6b
    • taniguchi
    • kn1cht
    • pddg