-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: rsvelte #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ node_modules | |
| .netlify | ||
| .wrangler | ||
| /.svelte-kit | ||
| /.svelte-check | ||
| /build | ||
|
|
||
| # OS | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "ignorePatterns": ["**/*.svelte", ".svelte-kit", ".svelte-check", "build"], | ||
| "rules": { | ||
| "no-unused-vars": [ | ||
| "warn", | ||
| { | ||
| "argsIgnorePattern": "^_", | ||
| "varsIgnorePattern": "^_", | ||
| "caughtErrorsIgnorePattern": "^_" | ||
| } | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,3 @@ | ||
| { | ||
| "recommendations": ["svelte.svelte-vscode", "oxc.oxc-vscode", "dbaeumer.vscode-eslint"] | ||
| "recommendations": ["svelte.svelte-vscode", "oxc.oxc-vscode"] | ||
| } |
Large diffs are not rendered by default.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "extends": ["recommended"], | ||
| "rules": { | ||
| "svelte/no-at-html-tags": "off", | ||
| "svelte/no-navigation-without-resolve": "off", | ||
| "svelte/block-lang": "off", | ||
| "svelte/consistent-selector-style": "off", | ||
| "svelte/no-inline-styles": "off", | ||
| "svelte/prefer-destructured-store-props": "off", | ||
| "svelte/require-optimized-style-attribute": "off" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| export function handleError({ error }) { | ||
| import type { Handle, HandleServerError } from '@sveltejs/kit' | ||
|
|
||
| export const handleError: HandleServerError = ({ error }) => { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I always dislike this added ceremony (explicitly importing types that SvelteKit has already typed through its magic 🪄) I can either learn to embrace types everywhere even though its already typesafe, for the sake of being explicit (good argument for it) - or, can we revert this as the types are already applied? |
||
| const env = import.meta.env.environment | ||
| const err = error instanceof Error ? error : new Error('Unknown error') | ||
|
|
||
|
|
@@ -10,7 +12,7 @@ export function handleError({ error }) { | |
| } | ||
| } | ||
|
|
||
| export const handle = async ({ event, resolve }) => { | ||
| export const handle: Handle = async ({ event, resolve }) => { | ||
| const response = await resolve(event) | ||
|
|
||
| response.headers.set('Cache-Control', 'no-cache') | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // @sveltejs/vite-plugin-svelte is aliased to @rsvelte/vite-plugin-svelte (see package.json overrides), | ||
| // whose bundled types only declare the @rsvelte module name. Re-export them under the aliased name. | ||
| declare module '@sveltejs/vite-plugin-svelte' { | ||
| export * from '@rsvelte/vite-plugin-svelte' | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious on this diff, do we need to change line width or was this previously formatted incorrectly?