Skip to content

Commit

Permalink
Add eslint-plugin-wc (go-gitea#24689)
Browse files Browse the repository at this point in the history
Add [eslint-plugin-wc](https://github.com/43081j/eslint-plugin-wc),
another small set of eslint rules covering web components.
  • Loading branch information
silverwind authored May 12, 2023
1 parent 9173e07 commit a4d6f83
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins:
- eslint-plugin-sonarjs
- eslint-plugin-custom-elements
- eslint-plugin-regexp
- eslint-plugin-wc

env:
es2022: true
Expand Down Expand Up @@ -717,6 +718,15 @@ rules:
use-isnan: [2]
valid-typeof: [2, {requireStringLiterals: true}]
vars-on-top: [0]
wc/attach-shadow-constructor: [2]
wc/guard-super-call: [2]
wc/no-closed-shadow-root: [2]
wc/no-constructor-attributes: [2]
wc/no-constructor-params: [2]
wc/no-invalid-element-name: [0] # covered by custom-elements/valid-tag-name
wc/no-self-class: [2]
wc/no-typos: [2]
wc/require-listener-teardown: [2]
wrap-iife: [2, inside]
wrap-regex: [0]
yield-star-spacing: [2, after]
Expand Down
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"eslint-plugin-sonarjs": "0.19.0",
"eslint-plugin-unicorn": "47.0.0",
"eslint-plugin-vue": "9.12.0",
"eslint-plugin-wc": "1.5.0",
"jsdom": "22.0.0",
"markdownlint-cli": "0.34.0",
"stylelint": "15.6.1",
Expand Down

0 comments on commit a4d6f83

Please sign in to comment.