Skip to content

Commit

Permalink
Add eslint-plugin-custom-elements (go-gitea#23991)
Browse files Browse the repository at this point in the history
Add
[eslint-plugin-custom-elements](https://github.com/github/eslint-plugin-custom-elements)
and enable all rules that I've found sensible.
  • Loading branch information
silverwind authored Apr 8, 2023
1 parent b918a2c commit 3037922
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ plugins:
- eslint-plugin-import
- eslint-plugin-jquery
- eslint-plugin-sonarjs
- eslint-plugin-custom-elements

env:
es2022: true
Expand Down Expand Up @@ -62,6 +63,19 @@ rules:
consistent-this: [0]
constructor-super: [2]
curly: [0]
custom-elements/expose-class-on-global: [0]
custom-elements/extends-correct-class: [2]
custom-elements/file-name-matches-element: [0]
custom-elements/no-constructor: [2]
custom-elements/no-customized-built-in-elements: [2]
custom-elements/no-dom-traversal-in-attributechangedcallback: [2]
custom-elements/no-dom-traversal-in-connectedcallback: [2]
custom-elements/no-exports-with-element: [2]
custom-elements/no-method-prefixed-with-on: [2]
custom-elements/no-unchecked-define: [0]
custom-elements/one-element-per-file: [0]
custom-elements/tag-name-matches-class: [2]
custom-elements/valid-tag-name: [2]
default-case-last: [2]
default-case: [0]
default-param-last: [0]
Expand Down
10 changes: 10 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 @@ -59,6 +59,7 @@
"@stoplight/spectral-cli": "6.6.0",
"@vitejs/plugin-vue": "4.1.0",
"eslint": "8.37.0",
"eslint-plugin-custom-elements": "0.0.7",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jquery": "1.5.1",
"eslint-plugin-sonarjs": "0.19.0",
Expand Down

0 comments on commit 3037922

Please sign in to comment.