Skip to content

Commit

Permalink
Update to svelte@5 and create-svelte -> sv
Browse files Browse the repository at this point in the history
* Bump CI node version to LTS
* Allow CI to install with updated lock file if necessary
* Override `cookie` until sveltekit bumps
* Add missing `importHelpers` in tsconfig.json
  • Loading branch information
IronBatman2715 committed Dec 14, 2024
1 parent 1389f10 commit 14418e3
Show file tree
Hide file tree
Showing 10 changed files with 946 additions and 687 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22 # current LTS

- name: Install node packages
run: npm ci
run: npm i

- name: Setup env var(s)
run: |
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ node_modules
# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
engine-strict=true
resolution-mode=highest
18 changes: 10 additions & 8 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import eslint from "@eslint/js";
import prettier from "eslint-config-prettier";
import eslint from "@eslint/js";
import { includeIgnoreFile } from "@eslint/compat";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import tseslint from "typescript-eslint";
import { fileURLToPath } from "node:url";
import tsEslint from "typescript-eslint";
const gitignorePath = fileURLToPath(new URL("./.gitignore", import.meta.url));

export default tseslint.config(
export default tsEslint.config(
includeIgnoreFile(gitignorePath),
eslint.configs.recommended,
...tseslint.configs.recommended,
...tsEslint.configs.recommended,
...svelte.configs["flat/recommended"],
prettier,
...svelte.configs["flat/prettier"],
Expand All @@ -20,15 +24,13 @@ export default tseslint.config(
},
{
files: ["**/*.svelte"],

languageOptions: {
parserOptions: {
parser: tseslint.parser,
parser: tsEslint.parser,
},
},
},
{
ignores: ["build/", ".svelte-kit/", "dist/"],
},
{
rules: {
"no-undef": "off", // https://typescript-eslint.io/linting/troubleshooting/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
Expand Down
Loading

0 comments on commit 14418e3

Please sign in to comment.