0.0.1 • Published 6 years ago
eslint-plugin-stencil v0.0.1
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-devNext, install eslint-plugin-stencil:
$ npm install eslint-plugin-stencil --save-devNote: 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.