Skip to content

Commit a4d6f83

Browse files
authored
Add eslint-plugin-wc (#24689)
Add [eslint-plugin-wc](https://github.com/43081j/eslint-plugin-wc), another small set of eslint rules covering web components.
1 parent 9173e07 commit a4d6f83

File tree

3 files changed

+40
-0
lines changed

3 files changed

+40
-0
lines changed

.eslintrc.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ plugins:
1616
- eslint-plugin-sonarjs
1717
- eslint-plugin-custom-elements
1818
- eslint-plugin-regexp
19+
- eslint-plugin-wc
1920

2021
env:
2122
es2022: true
@@ -717,6 +718,15 @@ rules:
717718
use-isnan: [2]
718719
valid-typeof: [2, {requireStringLiterals: true}]
719720
vars-on-top: [0]
721+
wc/attach-shadow-constructor: [2]
722+
wc/guard-super-call: [2]
723+
wc/no-closed-shadow-root: [2]
724+
wc/no-constructor-attributes: [2]
725+
wc/no-constructor-params: [2]
726+
wc/no-invalid-element-name: [0] # covered by custom-elements/valid-tag-name
727+
wc/no-self-class: [2]
728+
wc/no-typos: [2]
729+
wc/require-listener-teardown: [2]
720730
wrap-iife: [2, inside]
721731
wrap-regex: [0]
722732
yield-star-spacing: [2, after]

package-lock.json

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"eslint-plugin-sonarjs": "0.19.0",
6969
"eslint-plugin-unicorn": "47.0.0",
7070
"eslint-plugin-vue": "9.12.0",
71+
"eslint-plugin-wc": "1.5.0",
7172
"jsdom": "22.0.0",
7273
"markdownlint-cli": "0.34.0",
7374
"stylelint": "15.6.1",

0 commit comments

Comments
 (0)