0.2.1 • Published 4 years ago

htmllinter-plugin-eslint v0.2.1

Weekly downloads
7
License
-
Repository
github
Last release
4 years ago

htmllinter-plugin-eslint

htmllinter plugin to lint css inside of script tags using eslint

Installation

yarn add htmllinter-plugin-eslint --dev

Usage

In your htmllinter.config.js file, include this module in plugin property

htmllinter.config.js

module.exports = {
  plugins: [require('htmllinter-plugin-eslint')],
  rules: {
    eslint: 'on',
  },
};

Configuration of eslint rules and config

We are using Eslint's Node API for running the eslint linter

Refer this for options this rule accepts

You can pass these options from htmllinter.config.js 's rules property

Example :

// htmllinter.config.js

module.exports = {
  plugins: [require('htmllinter-plugin-eslint')],
  rules: {
    eslint: [
      'on',
      {
        eslintOptions: {
          ...
        },
      },
    ],
  },
};