Skip to content

Commit f96e4c7

Browse files
committed
fix: update svelte and tailwindcss 4
1 parent d484c62 commit f96e4c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+2641
-2927
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

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

.gitignore

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
.DS_Store
1+
test-results
22
node_modules
3+
4+
# Output
5+
.output
6+
.vercel
7+
.netlify
8+
.wrangler
9+
/.svelte-kit
310
/build
411
/dist
5-
/.svelte-kit
6-
/package
12+
13+
# OS
14+
.DS_Store
15+
Thumbs.db
16+
17+
# Env
718
.env
819
.env.*
920
!.env.example
21+
!.env.test
22+
23+
# Vite
1024
vite.config.js.timestamp-*
1125
vite.config.ts.timestamp-*
12-
/src/routes/testdir
13-
/test-results
14-
bun.lockb
15-
/.vercel

.prettierignore

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# Ignore files for PNPM, NPM and YARN
2-
pnpm-lock.yaml
1+
# Package Managers
32
package-lock.json
3+
pnpm-lock.yaml
44
yarn.lock
5-
samples/
6-
/src/routes/md/
7-
*.html
8-
/src/routes/utils/highlight/*
9-
/.vercel

.prettierrc

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
{
2-
"useTabs": false,
3-
"tabWidth": 2,
4-
"singleQuote": false,
5-
"trailingComma": "none",
6-
"printWidth": 1000,
7-
"htmlWhitespaceSensitivity": "ignore",
8-
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
9-
"overrides": [
10-
{
11-
"files": "*.svelte",
12-
"options": {
13-
"parser": "svelte"
14-
}
15-
}
16-
]
2+
"useTabs": true,
3+
"singleQuote": true,
4+
"trailingComma": "none",
5+
"printWidth": 100,
6+
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
7+
"overrides": [
8+
{
9+
"files": "*.svelte",
10+
"options": {
11+
"parser": "svelte"
12+
}
13+
}
14+
]
1715
}

eslint.config.js

Lines changed: 38 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,39 @@
1-
import js from "@eslint/js";
2-
import ts from "typescript-eslint";
3-
import svelte from "eslint-plugin-svelte";
4-
import prettier from "eslint-config-prettier";
5-
import globals from "globals";
1+
import prettier from 'eslint-config-prettier';
2+
import js from '@eslint/js';
3+
import { includeIgnoreFile } from '@eslint/compat';
4+
import svelte from 'eslint-plugin-svelte';
5+
import globals from 'globals';
6+
import { fileURLToPath } from 'node:url';
7+
import ts from 'typescript-eslint';
8+
import svelteConfig from './svelte.config.js';
9+
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
610

7-
/** @type {import('eslint').Linter.Config[]} */
8-
export default [
9-
js.configs.recommended,
10-
...ts.configs.recommended,
11-
...svelte.configs["flat/recommended"],
12-
prettier,
13-
...svelte.configs["flat/prettier"],
14-
{
15-
languageOptions: {
16-
globals: {
17-
...globals.browser,
18-
...globals.node,
19-
__NAME__: "readonly",
20-
__VERSION__: "readonly",
21-
__GITHUBURL__: "readonly",
22-
__SVELTEVERSION__: "readonly",
23-
__SVELTEKITVERSION__: "readonly",
24-
__VITEVERSION__: "readonly",
25-
__TAILWINDCSSVERSION__: "readonly"
26-
}
27-
}
28-
},
29-
{
30-
files: ["**/*.svelte"],
31-
languageOptions: {
32-
parserOptions: {
33-
parser: ts.parser,
34-
svelteFeatures: {
35-
experimentalGenerics: true
36-
}
37-
}
38-
}
39-
},
40-
{
41-
ignores: [".vercel/", "src/routes/utils/highlight/", "build/", ".svelte-kit/", "dist/", "test-results/", "*.md", "src/**/*/Setup.svelte"]
42-
},
43-
{
44-
rules: {
45-
// Note: you must disable the base rule as it can report incorrect errors
46-
// "no-unused-vars": "off",
47-
// "@typescript-eslint/no-unused-vars": "off",
48-
"svelte/no-at-html-tags": "off"
49-
}
50-
}
51-
];
11+
export default ts.config(
12+
includeIgnoreFile(gitignorePath),
13+
js.configs.recommended,
14+
...ts.configs.recommended,
15+
...svelte.configs.recommended,
16+
prettier,
17+
...svelte.configs.prettier,
18+
{
19+
languageOptions: {
20+
globals: {
21+
...globals.browser,
22+
...globals.node
23+
}
24+
}
25+
},
26+
{
27+
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
28+
ignores: ['eslint.config.js', 'svelte.config.js'],
29+
30+
languageOptions: {
31+
parserOptions: {
32+
projectService: true,
33+
extraFileExtensions: ['.svelte'],
34+
parser: ts.parser,
35+
svelteConfig
36+
}
37+
}
38+
}
39+
);

0 commit comments

Comments
 (0)