Skip to content

Commit 5f47e16

Browse files
authored
443 Use latest JS dependencies (#444)
* use latest dependencies * Update .gitignore * Update .nvmrc * use `npm run build-only`
1 parent 309932f commit 5f47e16

File tree

21 files changed

+5946
-6428
lines changed

21 files changed

+5946
-6428
lines changed

.github/workflows/playwright.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
pip install -r requirements/test-requirements.txt
2929
cd admin_ui && npm install
3030
- name: Build front end assets
31-
run: cd admin_ui && npm run build
31+
run: cd admin_ui && npm run build-only
3232
- name: Ensure Chromium is installed
3333
run: python -m playwright install chromium --with-deps
3434
- name: Start Playwright tests

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
pip install -r requirements/test-requirements.txt
6363
cd admin_ui && npm install
6464
- name: Build front end assets
65-
run: cd admin_ui && npm run build
65+
run: cd admin_ui && npm run build-only
6666
- name: Test with pytest, SQLite
6767
run: ./scripts/run-tests.sh
6868
- name: Upload coverage

admin_ui/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
2+
charset = utf-8
3+
indent_size = 4
4+
indent_style = space
5+
insert_final_newline = true
6+
trim_trailing_whitespace = true
7+
8+
end_of_line = lf
9+
max_line_length = 80

admin_ui/.eslintrc.cjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

admin_ui/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

admin_ui/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ coverage
2121
.vscode/*
2222
!.vscode/extensions.json
2323
.idea
24-
.vscode
2524
*.suo
2625
*.ntvs*
2726
*.njsproj
2827
*.sln
2928
*.sw?
29+
30+
*.tsbuildinfo

admin_ui/.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
18.18
1+
22

admin_ui/.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"semi": false,
4+
"singleQuote": false,
5+
"printWidth": 80,
6+
"trailingComma": "none"
7+
}

admin_ui/README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,15 @@ This template should help get you started developing with Vue 3 in Vite.
44

55
## Recommended IDE Setup
66

7-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin).
7+
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
88

99
## Type Support for `.vue` Imports in TS
1010

11-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12-
13-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14-
15-
1. Disable the built-in TypeScript Extension
16-
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17-
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
11+
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
1912

2013
## Customize configuration
2114

22-
See [Vite Configuration Reference](https://vitejs.dev/config/).
15+
See [Vite Configuration Reference](https://vite.dev/config/).
2316

2417
## Project Setup
2518

admin_ui/eslint.config.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { globalIgnores } from 'eslint/config'
2+
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
3+
import pluginVue from 'eslint-plugin-vue'
4+
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
5+
6+
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
7+
// import { configureVueProject } from '@vue/eslint-config-typescript'
8+
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
9+
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
10+
11+
export default defineConfigWithVueTs(
12+
{
13+
name: 'app/files-to-lint',
14+
files: ['**/*.{ts,mts,tsx,vue}'],
15+
},
16+
17+
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
18+
19+
pluginVue.configs['flat/essential'],
20+
vueTsConfigs.recommended,
21+
skipFormatting,
22+
)

0 commit comments

Comments
 (0)