Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ build
src/routes/.DS_Store
.DS_Store
static/blog/images
package-lock.json
41 changes: 41 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import js from '@eslint/js';
import eslintPluginSvelte from 'eslint-plugin-svelte';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';
import tseslint from 'typescript-eslint';

const projectParserOptions = {
project: './tsconfig.json',
tsconfigRootDir: new URL('.', import.meta.url),
extraFileExtensions: ['.svelte']
};

export default tseslint.config(
{ ignores: ['.svelte-kit/**/*', 'build/**/*', 'dist/**/*', 'node_modules/**/*'] },
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
...tseslint.configs.stylisticTypeChecked,
...eslintPluginSvelte.configs['flat/recommended'],
{
files: ['**/*.{js,ts,svelte}'],
languageOptions: {
parserOptions: projectParserOptions,
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: projectParserOptions
},
processor: eslintPluginSvelte.processors.svelte,
settings: {
'svelte/typescript': true,
'svelte/config': 'svelte.config.js'
}
},
eslintConfigPrettier
);
Loading