Skip to content

Commit

Permalink
Merge pull request #1 from eniehack/migrate-svelte5
Browse files Browse the repository at this point in the history
Migrate svelte5
  • Loading branch information
eniehack authored Dec 5, 2024
2 parents ddbf73d + 5664320 commit 000abd6
Show file tree
Hide file tree
Showing 14 changed files with 1,785 additions and 1,626 deletions.
13 changes: 0 additions & 13 deletions .eslintignore

This file was deleted.

30 changes: 0 additions & 30 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: 'trunk'

env:
ARTIFACT_DIR: "build"
ARTIFACT_DIR: 'build'
BASE_PATH: '/scrapbox-planetarium'

jobs:
Expand Down
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
54 changes: 54 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import svelteParser from 'svelte-eslint-parser';

const tsconfig = tseslint.config({
files: ['**/*.js', '**/*.ts', '**/*.svelte'],
extends: [
js.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
...svelte.configs['flat/recommended']
],
ignores: ['svelte.config.js'],
languageOptions: {
globals: globals.browser,
parser: tseslint.parser,
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
extraFileExtensions: ['.svelte']
}
}
});

const svelteConfig = tseslint.config({
files: ['**/*.svelte'],
extends: [...svelte.configs['flat/recommended']],
languageOptions: {
parser: svelteParser,
parserOptions: { parser: tseslint.parser }
}
});

const jsConfig = {
files: ['**/*.js'],
rules: { '@typescript-eslint/explicit-function-return-type': 'off' }
};

const configConfig = {
files: ['**/*.config.*'],
rules: { '@typescript-eslint/naming-convention': 'off' }
};

export default [
{
ignores: ['.svelte-kit/*', '.vercel/*', 'node_modules']
},
...tsconfig,
...svelteConfig,
jsConfig,
configConfig
];
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,36 @@
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --plugin-search-dir . --check . && eslint .",
"format": "prettier --plugin-search-dir . --write ."
"lint": "eslint .",
"lint:fix": "eslint --fix .",
"format": "prettier --check .",
"format:fix": "prettier --write ."
},
"devDependencies": {
"@fontsource/fira-mono": "^4.5.10",
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.20.4",
"@types/cookie": "^0.5.1",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-svelte": "^2.30.0",
"prettier": "^2.8.0",
"prettier-plugin-svelte": "^2.10.1",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"tslib": "^2.4.1",
"typescript": "^5.0.0",
"vite": "^4.4.2"
},
"type": "module",
"dependencies": {
"@sveltejs/adapter-auto": "^3.3.0",
"@sveltejs/adapter-static": "^3.0.5",
"@sveltejs/kit": "^2.7.2",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@types/cookie": "^0.5.4",
"eslint": "^9.13.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.46.0",
"globals": "^15.11.0",
"graphology": "^0.25.4",
"graphology-layout": "^0.6.1",
"graphology-layout-forceatlas2": "^0.10.1",
"prettier": "^3.3.3",
"prettier-plugin-svelte": "^3.2.7",
"sigma": "3.0.0-alpha3",
"zod": "^3.22.2"
}
"svelte": "^5.0.5",
"svelte-check": "^4.0.5",
"tslib": "^2.8.0",
"typescript": "^5.6.3",
"typescript-eslint": "^8",
"vite": "^5.4.10",
"zod": "^3.23.8"
},
"type": "module"
}
Loading

0 comments on commit 000abd6

Please sign in to comment.