Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate web app to sveltekit #265

Merged
merged 8 commits into from
Jul 28, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ bin
# Generated files
*.gen.go
web/api
web/.svelte-kit

# Logs
logs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Or, if the goal is to run each application independently, see the following step

### Web App

The web application can be found in the `web` directory. It uses [Svelte](https://svelte.dev/).
The web application can be found in the `web` directory. It uses [SvelteKit](https://kit.svelte.dev/).

The web application contains several scripts to lint, build and run the project. To check the available scripts, run the following command inside the `web` directory:

Expand Down
2 changes: 1 addition & 1 deletion cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ ignorePaths:
- server/database/scripts
- server/deployments
- server/config.yml
- web/public
- web/static
- web/src/locales
ignoreRegExpList:
- "import\\s*\\((.|[\r\n])*?\\)" # Ignore go multiline imports.
Expand Down
70 changes: 70 additions & 0 deletions web/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import js from "@eslint/js";
import prettier from "eslint-config-prettier";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import ts from "typescript-eslint";

import svelteConfig from "./svelte.config.js";

/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs["flat/recommended"],
prettier,
...svelte.configs["flat/prettier"],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
},
},
{
files: ["**/*.svelte"],
languageOptions: {
parserOptions: {
svelteConfig,
parser: ts.parser,
svelteFeatures: {
experimentalGenerics: true,
},
},
},
},
{
plugins: {
"simple-import-sort": simpleImportSort,
},
rules: {
"simple-import-sort/imports": [
"error",
{
groups: [
// Side effect imports.
["^\\u0000"],
// Svelte imports.
["^svelte"],
// Node.js builtins prefixed with `node:`.
["^node:"],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
["^@?\\w"],
// Absolute imports and other imports such as Svelte-style `$lib`.
// Anything not matched in another group.
["^"],
// Relative imports.
// Anything that starts with a dot.
["^\\."],
],
},
],
"simple-import-sort/exports": "error",
},
},
{
ignores: [".svelte-kit/", "dist/"],
},
];
14 changes: 0 additions & 14 deletions web/index.html

This file was deleted.

Loading