Skip to content

Commit e01ea63

Browse files
committed
chore: add lit analyze and fix workflow
1 parent 0320e06 commit e01ea63

File tree

6 files changed

+254
-12
lines changed

6 files changed

+254
-12
lines changed

.github/workflows/pull-request.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
steps:
1818
- name: Checkout
1919
uses: actions/checkout@v4
20-
20+
2121
- name: Setup node
2222
uses: actions/setup-node@v4
23-
with:
24-
node-version: 20
25-
cache: npm
23+
with:
24+
node-version: 20
25+
cache: npm
2626

2727
- name: Setup cache
2828
uses: actions/cache@v4
@@ -39,10 +39,13 @@ jobs:
3939
run: npm run lint
4040

4141
- name: Test
42-
run: npm test
42+
run: npm test
4343

4444
- name: Build
4545
env:
46+
VITE_APP_URL: pull-request
47+
VITE_ROCKETCHAT_URL: pull-request
48+
VITE_CODIMD_URL: pull-request
4649
VITE_GITLAB_CLIENT_ID: pull-request
4750
VITE_GITLAB_AUTHORITY: pull-request
4851
run: npm run build

.github/workflows/push-main.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545

4646
- name: Setup node
4747
uses: actions/setup-node@v4
48-
with:
49-
node-version: 20
50-
cache: npm
48+
with:
49+
node-version: 20
50+
cache: npm
5151

5252
- name: Setup cache
5353
uses: actions/cache@v4
@@ -64,12 +64,15 @@ jobs:
6464
run: npm run lint
6565

6666
- name: Test
67-
run: npm test
67+
run: npm test
6868

6969
- name: Build
7070
env:
71-
VITE_GITLAB_CLIENT_ID: pull-request
72-
VITE_GITLAB_AUTHORITY: pull-request
71+
VITE_APP_URL: main
72+
VITE_ROCKETCHAT_URL: main
73+
VITE_CODIMD_URL: main
74+
VITE_GITLAB_CLIENT_ID: main
75+
VITE_GITLAB_AUTHORITY: main
7376
run: npm run build
7477

7578
release:

package-lock.json

Lines changed: 226 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
"stylelint": "16.6.1",
7777
"stylelint-config-recess-order": "5.0.1",
7878
"stylelint-config-standard": "36.0.0",
79+
"ts-lit-plugin": "2.0.2",
7980
"tsx": "4.11.0",
8081
"typescript": "5.4.5",
8182
"typescript-eslint": "7.11.0",

src/app-shell.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ export class AppShell extends LitElement {
116116
]
117117

118118
render() {
119+
// https://github.com/runem/lit-analyzer/issues/239
120+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-explicit-any
121+
const sandbox = 'allow-scripts allow-forms allow-popups' as any
122+
119123
return html`<top-bar></top-bar>
120124
<main>
121125
<side-bar></side-bar>
@@ -126,7 +130,7 @@ export class AppShell extends LitElement {
126130
</main>
127131
<iframe
128132
${ref(this.iframeRef)}
129-
sandbox="allow-scripts allow-same-origin allow-forms allow-popups"
133+
sandbox=${sandbox}
130134
referrerpolicy="origin"
131135
src=${config.services.rocketChatUrl}
132136
id="chat"

tsconfig.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
22
"compilerOptions": {
3+
"plugins": [
4+
{
5+
"name": "ts-lit-plugin"
6+
}
7+
],
38
/* Library */
49
"target": "ESNext",
510
"experimentalDecorators": true,

0 commit comments

Comments
 (0)