eslint-plugin-lit
lit-html support for ESLint.
Install
$ npm i -D eslint eslint-plugin-lit
Usage
Add lit
to the plugins section of your .eslintrc
file:
{
"plugins": ["lit"]
}
Configure your rules like so:
{
"rules": {
"lit/rule-name": "error"
}
}
Configuration
You may also extend the recommended configuration like so:
{
"extends": ["plugin:lit/recommended"],
"env": {"browser": true}
}
Usage with eslint-plugin-wc
We highly recommend you also depend on
eslint-plugin-wc as it will
provide additional rules for web components in general:
npm i -D eslint-plugin-wc
Config:
{
"extends": [
"plugin:wc/recommended",
"plugin:lit/recommended"
],
"env": {"browser": true}
}
Supported Rules