diff --git a/eslint.config.js b/eslint.config.js index c15c17e7dc..d8875d37f9 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -5,10 +5,18 @@ import lube from 'eslint-plugin-lube'; export default [ ...svelte_config, { + languageOptions: { + parserOptions: { + project: true + } + }, plugins: { lube }, rules: { + '@typescript-eslint/await-thenable': 'error', + '@typescript-eslint/prefer-promise-reject-errors': 'error', + '@typescript-eslint/require-await': 'error', 'no-console': 'error', 'lube/svelte-naming-convention': ['error', { fixSameNames: true }], // eslint isn't that well-versed with JSDoc to know that `foo: /** @type{..} */ (foo)` isn't a violation of this rule, so turn it off @@ -43,7 +51,6 @@ export default [ 'documentation', // contains a fork of the REPL which doesn't adhere to eslint rules 'sites/svelte-5-preview/**', - 'playgrounds/demo/src/**', 'tmp/**', // wasn't checked previously, reenable at some point 'sites/svelte.dev/**' diff --git a/playgrounds/demo/.prettierignore b/playgrounds/demo/.prettierignore deleted file mode 100644 index 85de9cf933..0000000000 --- a/playgrounds/demo/.prettierignore +++ /dev/null @@ -1 +0,0 @@ -src diff --git a/playgrounds/demo/package.json b/playgrounds/demo/package.json index cc2739cb68..e96e8011ba 100644 --- a/playgrounds/demo/package.json +++ b/playgrounds/demo/package.json @@ -9,9 +9,7 @@ "ssr": "node ./server.js", "build": "vite build --outDir dist/client && vite build --outDir dist/server --ssr src/entry-server.ts", "prod": "npm run build && node dist", - "preview": "vite preview", - "format": "prettier --check --write .", - "lint": "prettier --check . && eslint" + "preview": "vite preview" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^3.1.0", diff --git a/playgrounds/sandbox/run.js b/playgrounds/sandbox/run.js index 86ec3fc882..dffcc0af58 100644 --- a/playgrounds/sandbox/run.js +++ b/playgrounds/sandbox/run.js @@ -29,7 +29,7 @@ function mkdirp(dir) { const svelte_modules = glob('**/*.svelte', { cwd: `${cwd}/input` }); const js_modules = glob('**/*.js', { cwd: `${cwd}/input` }); -for (const generate of ['client', 'server']) { +for (const generate of /** @type {const} */ (['client', 'server'])) { console.error(`\n--- generating ${generate} ---\n`); for (const file of svelte_modules) { const input = `${cwd}/input/${file}`; diff --git a/playgrounds/sandbox/tsconfig.json b/playgrounds/sandbox/tsconfig.json index 44ef7add23..8aa4b6f1e9 100644 --- a/playgrounds/sandbox/tsconfig.json +++ b/playgrounds/sandbox/tsconfig.json @@ -13,5 +13,5 @@ "allowJs": true, "checkJs": true }, - "include": ["./input"] + "include": ["./run.js", "./input"] }