43081j / Eslint Plugin Wc
Licence: mit
ESLint rules for Web Components
Stars: ✭ 35
Programming Languages
typescript
32286 projects
Projects that are alternatives of or similar to Eslint Plugin Wc
Typescript Eslint
✨ Monorepo for all the tooling which enables ESLint to support TypeScript
Stars: ✭ 10,831 (+30845.71%)
Mutual labels: eslint, hacktoberfest
Frontend
🍭 Frontend for Home Assistant
Stars: ✭ 1,366 (+3802.86%)
Mutual labels: hacktoberfest, webcomponents
Eslint Plugin Mocha
ESLint rules for mocha
Stars: ✭ 249 (+611.43%)
Mutual labels: eslint, hacktoberfest
Lsp Mode
Emacs client/library for the Language Server Protocol
Stars: ✭ 3,691 (+10445.71%)
Mutual labels: eslint, hacktoberfest
Tslint To Eslint Config
Converts your TSLint configuration to the closest possible ESLint equivalent. 🚀
Stars: ✭ 680 (+1842.86%)
Mutual labels: eslint, hacktoberfest
Eslint Config Wesbos
No-Sweat™ Eslint and Prettier Setup - with or without VS Code
Stars: ✭ 2,293 (+6451.43%)
Mutual labels: eslint, hacktoberfest
Apollo Elements
🚀🌛 Use the Launch Platform 👩🚀👨🚀
Stars: ✭ 278 (+694.29%)
Mutual labels: hacktoberfest, webcomponents
Prettier Eslint
Code ➡️ prettier ➡️ eslint --fix ➡️ Formatted Code ✨
Stars: ✭ 3,435 (+9714.29%)
Mutual labels: eslint, hacktoberfest
Rendertron
A Headless Chrome rendering solution
Stars: ✭ 5,593 (+15880%)
Mutual labels: hacktoberfest, webcomponents
Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (+1888.57%)
Mutual labels: eslint, hacktoberfest
Budgeting
Budgeting - React + Redux + Webpack (tree shaking) Sample App
Stars: ✭ 971 (+2674.29%)
Mutual labels: eslint
My Photo Timeline
A simple command-line app to organize your local photos by dates (year/month) on your local file system, for those who don't store photos in the cloud
Stars: ✭ 34 (-2.86%)
Mutual labels: hacktoberfest
Pencil
Pencil2D is an easy, intuitive tool to make 2D hand-drawn animations. Pencil2D is open source and cross-platform.
Stars: ✭ 968 (+2665.71%)
Mutual labels: hacktoberfest
Mahapps.metro
A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
Stars: ✭ 8,023 (+22822.86%)
Mutual labels: hacktoberfest
Cimonitor
Displays CI statuses on a dashboard and triggers fun modules representing the status!
Stars: ✭ 34 (-2.86%)
Mutual labels: hacktoberfest
Powershell Docs
The official PowerShell documentation sources
Stars: ✭ 968 (+2665.71%)
Mutual labels: hacktoberfest
Svelte Preprocess
A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
Stars: ✭ 970 (+2671.43%)
Mutual labels: hacktoberfest
Photon
⚡ Rust/WebAssembly image processing library
Stars: ✭ 963 (+2651.43%)
Mutual labels: hacktoberfest
eslint-plugin-wc
ESLint plugin for Web Components.
Install
$ npm i -D eslint eslint-plugin-wc
Usage
Add wc
to the plugins section of your .eslintrc
file:
{
"plugins": ["wc"]
}
Configure your rules like so:
{
"rules": {
"wc/rule-name": "error"
}
}
Configuration
You may also extend the recommended configuration like so:
{
"extends": ["plugin:wc/recommended"],
"env": {"browser": true}
}
Or the best practice configuration which extends this to include all best practice rules:
{
"extends": ["plugin:wc/best-practice"],
"env": {"browser": true}
}
Custom settings
Settings are configured through a settings
option in your eslintrc file.
wc.elementBaseClasses
{
"settings": {
"wc": {
"elementBaseClasses": ["MyBaseElement"]
}
}
}
Using this setting, you can control which base classes are considered to be custom elements.
Supported Rules
Possible Errors (recommended)
Rule | |
---|---|
wc/no-constructor-attributes | Disallows interaction with attributes in constructors |
wc/no-invalid-element-name | Disallows invalid custom element names |
wc/no-self-class | Disallows class mutations on self |
Best Practice
Rule | |
---|---|
wc/attach-shadow-constructor | Disallows attaching a shadow root outside the constructor |
wc/guard-super-call | Requires a guard before calling a super method inside a Custom Element Lifecycle hook |
wc/no-closed-shadow-root | Disallows closed shadow roots |
wc/no-typos | Prevents common typos |
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].