Skip to content

Commit 3037922

Browse files
authored
Add eslint-plugin-custom-elements (#23991)
Add [eslint-plugin-custom-elements](https://github.com/github/eslint-plugin-custom-elements) and enable all rules that I've found sensible.
1 parent b918a2c commit 3037922

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

.eslintrc.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ plugins:
1313
- eslint-plugin-import
1414
- eslint-plugin-jquery
1515
- eslint-plugin-sonarjs
16+
- eslint-plugin-custom-elements
1617

1718
env:
1819
es2022: true
@@ -62,6 +63,19 @@ rules:
6263
consistent-this: [0]
6364
constructor-super: [2]
6465
curly: [0]
66+
custom-elements/expose-class-on-global: [0]
67+
custom-elements/extends-correct-class: [2]
68+
custom-elements/file-name-matches-element: [0]
69+
custom-elements/no-constructor: [2]
70+
custom-elements/no-customized-built-in-elements: [2]
71+
custom-elements/no-dom-traversal-in-attributechangedcallback: [2]
72+
custom-elements/no-dom-traversal-in-connectedcallback: [2]
73+
custom-elements/no-exports-with-element: [2]
74+
custom-elements/no-method-prefixed-with-on: [2]
75+
custom-elements/no-unchecked-define: [0]
76+
custom-elements/one-element-per-file: [0]
77+
custom-elements/tag-name-matches-class: [2]
78+
custom-elements/valid-tag-name: [2]
6579
default-case-last: [2]
6680
default-case: [0]
6781
default-param-last: [0]

package-lock.json

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
"@stoplight/spectral-cli": "6.6.0",
6060
"@vitejs/plugin-vue": "4.1.0",
6161
"eslint": "8.37.0",
62+
"eslint-plugin-custom-elements": "0.0.7",
6263
"eslint-plugin-import": "2.27.5",
6364
"eslint-plugin-jquery": "1.5.1",
6465
"eslint-plugin-sonarjs": "0.19.0",

0 commit comments

Comments
 (0)