eslint-plugin-stencil
v0.0.1
Published
ESLint rules specific to Stencil JS projects.
Downloads
460
Readme
eslint-plugin-stencil
ESLint rules specific to Stencil JS projects created by the Add To Event Team.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-stencil
:
$ npm install eslint-plugin-stencil --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install `eslint-plugin-stencil** globally.
Note: Assumes you are also using @typescript-eslint.
Usage
Add stencil
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"stencil"
]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"stencil/no-global-html-attribute-prop-names": "error"
}
}
Or alternatively extend the Stencil recommended ruleset:
{
"extends": [
"plugin:stencil/recommended"
]
}
Supported Rules
no-global-html-attribute-prop-names
This rule catches Stencil Prop names that share names of Global HTML Attributes.
Contributing
When submitting new rules please:
- Describe your new rule in the README.md
- Provide a suite of unit tests for your rule
- Follow ESLint Rule guidelines (the eslint-rule yeoman generator is good for this)
All contributions welcome.