Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
pip install -r requirements/test-requirements.txt
cd admin_ui && npm install
- name: Build front end assets
run: cd admin_ui && npm run build
run: cd admin_ui && npm run build-only
- name: Ensure Chromium is installed
run: python -m playwright install chromium --with-deps
- name: Start Playwright tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
pip install -r requirements/test-requirements.txt
cd admin_ui && npm install
- name: Build front end assets
run: cd admin_ui && npm run build
run: cd admin_ui && npm run build-only
- name: Test with pytest, SQLite
run: ./scripts/run-tests.sh
- name: Upload coverage
Expand Down
9 changes: 9 additions & 0 deletions admin_ui/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

end_of_line = lf
max_line_length = 80
15 changes: 0 additions & 15 deletions admin_ui/.eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions admin_ui/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
3 changes: 2 additions & 1 deletion admin_ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ coverage
.vscode/*
!.vscode/extensions.json
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

*.tsbuildinfo
2 changes: 1 addition & 1 deletion admin_ui/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.18
22
7 changes: 7 additions & 0 deletions admin_ui/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://json.schemastore.org/prettierrc",
"semi": false,
"singleQuote": false,
"printWidth": 80,
"trailingComma": "none"
}
13 changes: 3 additions & 10 deletions admin_ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,15 @@ This template should help get you started developing with Vue 3 in Vite.

## Recommended IDE Setup

[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).
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).

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

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.

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:

1. Disable the built-in TypeScript Extension
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
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.

## Customize configuration

See [Vite Configuration Reference](https://vitejs.dev/config/).
See [Vite Configuration Reference](https://vite.dev/config/).

## Project Setup

Expand Down
22 changes: 22 additions & 0 deletions admin_ui/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'

// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup

export default defineConfigWithVueTs(
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},

globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),

pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
skipFormatting,
)
Loading
Loading