Skip to content

Commit 72a7029

Browse files
authored
Merge pull request #66 from github/upgrade-to-new-web-component-standards
upgrade to new web component standards
2 parents 11618b9 + c3e963b commit 72a7029

File tree

11 files changed

+5197
-8379
lines changed

11 files changed

+5197
-8379
lines changed

.eslintrc.json

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,40 @@
11
{
2-
"parser": "@typescript-eslint/parser",
2+
"root": true,
33
"extends": [
44
"plugin:github/browser",
55
"plugin:github/recommended",
6-
"plugin:github/typescript"
6+
"plugin:github/typescript",
7+
"plugin:custom-elements/recommended"
78
],
8-
"globals": {
9-
"TabContainerElement": "readable"
10-
},
119
"rules": {
12-
"@typescript-eslint/no-non-null-assertion": "off"
10+
"custom-elements/tag-name-matches-class": [
11+
"error",
12+
{
13+
"suffix": "Element"
14+
}
15+
],
16+
"custom-elements/define-tag-after-class-definition": "off",
17+
"custom-elements/no-method-prefixed-with-on": "off",
18+
"custom-elements/expose-class-on-global": "off",
19+
"import/extensions": ["error", "always"],
20+
"import/no-unresolved": "off"
1321
},
1422
"overrides": [
1523
{
16-
"files": ["test/**/*.js", "prettier.config.js"],
17-
"parser": "espree",
24+
"files": "src/*-define.ts",
25+
"rules": {
26+
"@typescript-eslint/no-namespace": "off"
27+
}
28+
},
29+
{
30+
"files": "test/**/*.js",
1831
"rules": {
19-
"github/unescaped-html-literal": "off"
32+
"github/unescaped-html-literal": "off",
33+
"github/no-inner-html": "off",
34+
"i18n-text/no-en": "off"
35+
},
36+
"env": {
37+
"mocha": true
2038
}
2139
}
2240
]

.github/workflows/nodejs.yml

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,19 @@
1-
name: Build
2-
3-
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
1+
name: Node CI
82

3+
on: push
94
jobs:
105
build:
11-
name: Build
126
runs-on: ubuntu-latest
137
steps:
14-
- name: Get sources
15-
uses: actions/checkout@v1
16-
17-
- name: Restore npm cache
18-
uses: actions/cache@v2
8+
- uses: actions/checkout@v2
9+
- name: Use Node.js 18.x
10+
uses: actions/setup-node@v1
1911
with:
20-
path: ~/.npm
21-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22-
restore-keys: |
23-
${{ runner.os }}-node-
24-
25-
- uses: actions/cache@v2
26-
with:
27-
path: node_modules
28-
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
29-
restore-keys: |
30-
${{ runner.os }}-node-modules-
31-
32-
- name: Use Node.js 14
33-
uses: actions/setup-node@v2
34-
with:
35-
node-version: '14'
36-
37-
- name: Install dependencies
38-
run: npm install
39-
40-
- name: Build
41-
run: npm run build
42-
43-
- name: Test
44-
run: npm run test
12+
node-version: 18.x
13+
- name: npm install, build, and test
14+
run: |
15+
npm install
16+
npm run build --if-present
17+
npm test
4518
env:
4619
CI: true

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v3
1212
- uses: actions/setup-node@v3
1313
with:
14-
node-version: 14
14+
node-version: 18
1515
registry-url: https://registry.npmjs.org/
1616
cache: npm
1717
- run: npm ci

0 commit comments

Comments
 (0)