Skip to content

A series of lint rules for best practices with Custom Elements

License

Notifications You must be signed in to change notification settings

colebemis/eslint-plugin-custom-elements

 
 

Repository files navigation

eslint-plugin-custom-elements

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.

Requirements

Node 14.x

Installation

$ npm install --save-dev eslint eslint-plugin-custom-elements

Setup

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": ["custom-elements"],
  "extends": ["plugin:custom-elements/recommended"]
}

Rules

Development

npm install
npm test

License

Distributed under the MIT license. See LICENSE for details.

About

A series of lint rules for best practices with Custom Elements

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%