Skip to content

Commit 2310898

Browse files
authored
Merge pull request #51 from github/eslint-plugin-custom-elements
Install and enable `custom-elements` ESLint plugin
2 parents 168b7ab + 5ebe3bd commit 2310898

File tree

4 files changed

+377
-236
lines changed

4 files changed

+377
-236
lines changed

.eslintrc.json

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
{
22
"root": true,
3+
"plugins": ["custom-elements"],
34
"extends": [
45
"plugin:github/recommended",
56
"plugin:github/browser",
6-
"plugin:github/typescript"
7+
"plugin:github/typescript",
8+
"plugin:custom-elements/recommended"
79
],
8-
"overrides": [{
9-
"files": "*.js",
10-
"parser": "espree",
11-
"parserOptions": {"ecmaVersion": 8}
12-
}]
10+
"rules": {
11+
"custom-elements/tag-name-matches-class": ["error", {"suffix": "Element"}],
12+
"custom-elements/file-name-matches-element": "off"
13+
},
14+
"overrides": [
15+
{
16+
"files": "*.js",
17+
"parser": "espree",
18+
"parserOptions": {"ecmaVersion": 8}
19+
}
20+
]
1321
}

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v2
9-
- name: Use Node.js 12.x
9+
- name: Use Node.js 14.x
1010
uses: actions/setup-node@v1
1111
with:
12-
node-version: 12.x
12+
node-version: 14.x
1313
- name: npm install, build, and test
1414
run: |
1515
npm install

0 commit comments

Comments
 (0)