-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from eniehack/migrate-svelte5
Migrate svelte5
- Loading branch information
Showing
14 changed files
with
1,785 additions
and
1,626 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.