This is an ESLint Plugin to help provide best practices for writing Custom Elements aka Web Components. It provides a set of custom rules which can be enforced for files that declare classes that extend from HTMLElement.
$ npm install --save-dev eslint eslint-plugin-custom-elements
Add custom-elements
to your list of plugins in your ESLint config, and plugin:custom-elements/recommended
to the extends
array.
JSON ESLint config example:
{
"plugins": ["github"],
"extends": ["plugin:custom-elements/recommended"]
}