Skip to content

Commit 5ea0a8d

Browse files
committed
fix: update svelte and tailwindcss 4
1 parent e444571 commit 5ea0a8d

26 files changed

+1808
-7731
lines changed

.env copy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ANALYTICS_ID_TWO="G-12345ABCDE"

.github/FUNDING.yml

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

.gitignore

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
1-
.DS_Store
1+
test-results
22
node_modules
3-
/build
3+
4+
# Output
5+
.output
6+
.vercel
7+
.netlify
8+
.wrangler
49
/.svelte-kit
5-
/package
10+
/build
11+
/dist
12+
13+
# OS
14+
.DS_Store
15+
Thumbs.db
16+
17+
# Env
618
.env
719
.env.*
820
!.env.example
9-
.vercel
10-
src/routes/testdir
11-
/dist
12-
/.vercel
21+
!.env.test
22+
23+
# Vite
24+
vite.config.js.timestamp-*
25+
vite.config.ts.timestamp-*

.prettierignore

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
1-
.DS_Store
2-
node_modules
3-
/build
4-
/.svelte-kit
5-
/package
6-
.env
7-
.env.*
8-
!.env.example
9-
/dist
10-
/.vercel
11-
12-
# Ignore files for PNPM, NPM and YARN
13-
pnpm-lock.yaml
1+
# Package Managers
142
package-lock.json
3+
pnpm-lock.yaml
154
yarn.lock
16-
playwright-report
17-
.vercel
18-
19-
*.md
20-
/src/routes/utils/highlight

.prettierrc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"useTabs": false,
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-
]
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+
]
1515
}

eslint.config.js

Lines changed: 35 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,39 @@
1+
import prettier from 'eslint-config-prettier';
12
import js from '@eslint/js';
2-
import ts from 'typescript-eslint';
3+
import { includeIgnoreFile } from '@eslint/compat';
34
import svelte from 'eslint-plugin-svelte';
4-
import prettier from 'eslint-config-prettier';
55
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));
10+
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'],
629

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-
}
20-
}
21-
},
22-
{
23-
files: ['**/*.svelte'],
24-
languageOptions: {
25-
parserOptions: {
26-
parser: ts.parser,
27-
svelteFeatures: {
28-
experimentalGenerics: true
29-
}
30-
}
31-
}
32-
},
33-
{
34-
ignores: [
35-
'.vercel/',
36-
'src/routes/utils/highlight',
37-
'build/',
38-
'.svelte-kit/',
39-
'dist/',
40-
'test-results/',
41-
'*.md'
42-
]
43-
},
44-
{
45-
rules: {
46-
// Note: you must disable the base rule as it can report incorrect errors
47-
// 'no-unused-vars': 'off',
48-
// '@typescript-eslint/no-unused-vars': 'off',
49-
// 'svelte/no-at-html-tags': 'off'
50-
}
51-
}
52-
];
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)