Skip to content

Commit 18b4274

Browse files
authored
Update dependencies (Svelte 5, Eslint 9) (#10)
* upgrade to svelte 5, eslint 9, vite 6, tailwind 4 * fix vitest config * fix dark mode button cursor, dark mode text color
1 parent 07293e9 commit 18b4274

13 files changed

Lines changed: 5632 additions & 6315 deletions

.eslintignore

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

.eslintrc.cjs

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

eslint.config.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import globals from 'globals';
2+
import pluginJs from '@eslint/js';
3+
import tseslint from 'typescript-eslint';
4+
import eslintPluginSvelte from 'eslint-plugin-svelte';
5+
import svelteConfig from './svelte.config.js';
6+
import eslintConfigPrettier from 'eslint-config-prettier';
7+
import * as typescriptParser from '@typescript-eslint/parser';
8+
9+
/** @type {import('eslint').Linter.Config[]} */
10+
export default [
11+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
12+
{ languageOptions: { globals: globals.browser } },
13+
pluginJs.configs.recommended,
14+
...tseslint.configs.recommended,
15+
...eslintPluginSvelte.configs['flat/recommended'],
16+
eslintConfigPrettier,
17+
{
18+
ignores: ['dist/', 'node_modules/'],
19+
},
20+
{
21+
files: ['**/*.svelte', '*.svelte'],
22+
languageOptions: {
23+
parserOptions: {
24+
svelteConfig,
25+
/**
26+
* Need these options so eslint can correctly check typescript syntax in .svelte files.
27+
*
28+
* @see https://sveltejs.github.io/eslint-plugin-svelte/user-guide/#parser-configuration
29+
*/
30+
parser: typescriptParser,
31+
project: './tsconfig.json',
32+
extraFileExtensions: ['.svelte'],
33+
},
34+
},
35+
},
36+
{ rules: { '@typescript-eslint/no-unused-vars': 'warn' } },
37+
];

0 commit comments

Comments
 (0)