web: allow @ imports

This commit is contained in:
Tulir Asokan 2024-10-13 17:11:43 +03:00
parent cd768d6f2e
commit 4eec9f5eb6
4 changed files with 13 additions and 1 deletions

View file

@ -2,5 +2,5 @@
cd web > /dev/null cd web > /dev/null
if [[ -f "./node_modules/.bin/eslint" ]]; then if [[ -f "./node_modules/.bin/eslint" ]]; then
ARGS=("$@") ARGS=("$@")
eslint ${ARGS[@]/#web\// } eslint --fix ${ARGS[@]/#web\// }
fi fi

View file

@ -37,6 +37,10 @@ export default tseslint.config(
"named": true, "named": true,
"warnOnUnassignedImports": true, "warnOnUnassignedImports": true,
"pathGroups": [{ "pathGroups": [{
"pattern": "@/**",
"group": "parent",
"position": "before",
}, {
"pattern": "*.svg?react", "pattern": "*.svg?react",
"patternOptions": {"matchBase": true}, "patternOptions": {"matchBase": true},
"group": "sibling", "group": "sibling",

View file

@ -7,6 +7,9 @@
"DOM", "DOM",
"DOM.Iterable" "DOM.Iterable"
], ],
"paths": {
"@/*": ["./src/*"]
},
"module": "ESNext", "module": "ESNext",
"skipLibCheck": true, "skipLibCheck": true,
/* Bundler mode */ /* Bundler mode */

View file

@ -13,6 +13,11 @@ export default defineConfig({
}, },
}), }),
], ],
resolve: {
alias: {
"@": "/src",
},
},
server: { server: {
proxy: { proxy: {
"/_gomuks/websocket": { "/_gomuks/websocket": {