Skip to content

Commit

Permalink
sveltekit: update dependencies and configs
Browse files Browse the repository at this point in the history
  • Loading branch information
while1618 committed Oct 5, 2024
1 parent 6939e8e commit 7efe864
Show file tree
Hide file tree
Showing 16 changed files with 2,331 additions and 2,344 deletions.
13 changes: 0 additions & 13 deletions frontend/svelte-kit/.eslintignore

This file was deleted.

43 changes: 0 additions & 43 deletions frontend/svelte-kit/.eslintrc.cjs

This file was deleted.

19 changes: 16 additions & 3 deletions frontend/svelte-kit/.gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
.DS_Store
node_modules
/build

# Output
.output
.vercel
/.svelte-kit
/package
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

test-results
17 changes: 6 additions & 11 deletions frontend/svelte-kit/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock

.vscode/
project.inlang/
src/lib/paraglide/
9 changes: 8 additions & 1 deletion frontend/svelte-kit/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@
"printWidth": 100,
"endOfLine": "auto",
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
45 changes: 45 additions & 0 deletions frontend/svelte-kit/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import js from '@eslint/js';
import prettier from 'eslint-config-prettier';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';

/** @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: {
parser: ts.parser,
},
},
},
{
ignores: ['build/', '.svelte-kit/', 'dist/', 'src/lib/paraglide'],
},
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
];
53 changes: 25 additions & 28 deletions frontend/svelte-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,36 @@
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"check-updates": "npx npm-check-updates",
"format": "prettier --write .",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
"lint": "prettier --check . && eslint .",
"lint:fix": "prettier --write . && eslint --fix ."
},
"dependencies": {
"jsonwebtoken": "9.0.2",
"zod": "3.22.4"
"zod": "3.23.8"
},
"devDependencies": {
"@playwright/test": "1.41.2",
"@sveltejs/adapter-auto": "3.1.1",
"@sveltejs/kit": "2.5.1",
"@sveltejs/vite-plugin-svelte": "3.0.2",
"@types/jsonwebtoken": "9.0.5",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"autoprefixer": "10.4.17",
"daisyui": "4.7.2",
"eslint": "8.57.0",
"@playwright/test": "1.47.2",
"@sveltejs/adapter-auto": "3.2.5",
"@sveltejs/kit": "2.6.1",
"@sveltejs/vite-plugin-svelte": "3.1.2",
"@types/eslint": "9.6.1",
"@types/jsonwebtoken": "9.0.7",
"autoprefixer": "10.4.20",
"daisyui": "4.12.12",
"eslint": "9.12.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-svelte": "2.35.1",
"postcss": "8.4.35",
"postcss-load-config": "5.0.3",
"prettier": "3.2.5",
"prettier-plugin-svelte": "3.2.1",
"prettier-plugin-tailwindcss": "0.5.11",
"svelte": "4.2.12",
"svelte-check": "3.6.4",
"svelte-preprocess": "5.1.3",
"tailwindcss": "3.4.1",
"tslib": "2.6.2",
"typescript": "5.3.3",
"vite": "5.1.4",
"vitest": "1.3.1"
"eslint-plugin-svelte": "2.44.1",
"globals": "15.10.0",
"postcss": "8.4.47",
"prettier": "3.3.3",
"prettier-plugin-svelte": "3.2.7",
"prettier-plugin-tailwindcss": "0.6.8",
"svelte": "4.2.19",
"svelte-check": "4.0.4",
"tailwindcss": "3.4.13",
"typescript": "5.5.4",
"typescript-eslint": "8.8.0",
"vite": "5.4.8",
"vitest": "2.1.2"
}
}
3 changes: 2 additions & 1 deletion frontend/svelte-kit/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ const config: PlaywrightTestConfig = {
command: 'pnpm run build && pnpm run preview',
port: 4173,
},
testDir: 'tests',
use: {
browserName: 'firefox',
},
testDir: 'tests',
testMatch: /(.+\.)?(test|spec)\.[jt]s/,
};

export default config;
Loading

0 comments on commit 7efe864

Please sign in to comment.