From 089385f9cd25bee4ede01dd21b5411b414397514 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Sat, 11 Oct 2025 19:59:36 +0100 Subject: [PATCH] Fixed linting config, and added a script to hold my beer --- eslint.config.js | 22 ++++++++++++++++++++++ package.json | 5 +++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 1832b49..94413e0 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -29,6 +29,28 @@ export default [ 'svelte/no-navigation-without-resolve': 'off' } }, + { + files: ['**/*.svelte.ts'], + languageOptions: { + parser: tseslint.parser, + parserOptions: { + ecmaVersion: 'latest', + sourceType: 'module', + extraFileExtensions: ['.svelte'] + }, + globals: { + ...globals.browser, + ...globals.es2023, + // Svelte 5 runes globals + $state: 'readonly', + $derived: 'readonly', + $effect: 'readonly', + $props: 'readonly', + $bindable: 'readonly', + $inspect: 'readonly' + } + } + }, { rules: { // Prefer TS version of unused-vars, and ignore _-prefixed diff --git a/package.json b/package.json index a41aa10..6ae05b6 100644 --- a/package.json +++ b/package.json @@ -15,10 +15,11 @@ "build-check": "vite build --minify=false --sourcemap=false --logLevel error", "build:node": "DEPLOY_ENV='node' npm run build", "build:static": "DEPLOY_ENV='static' npm run build", - "test": "vitest", + "test": "vitest run", "test:coverage": "vitest run --coverage", "test:api": "vitest run --config tests/vitest.api.config.ts", - "test:e2e": "playwright test" + "test:e2e": "playwright test", + "hold-my-beer": "npm run format && npm run lint && npm run types && npm run check && npm run build-check && npm run test" }, "devDependencies": { "@axe-core/playwright": "^4.10.2",