Skip to content
Draft
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
51 changes: 51 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import prettier from 'eslint-config-prettier';
import path from 'node:path';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import { defineConfig, includeIgnoreFile } from 'eslint/config';
import globals from 'globals';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';

const gitignorePath = path.resolve(import.meta.dirname, '.gitignore');

export default defineConfig(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
ts.configs.recommended,
svelte.configs.recommended,
prettier,
svelte.configs.prettier,
{
languageOptions: { globals: { ...globals.browser, ...globals.node } },
rules: {
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'no-empty-pattern': 'off',
'svelte/no-navigation-without-resolve': 'off',
'svelte/prefer-writable-derived': 'off',
// only applicable to src/lib/components/admin/EditableItemList.svelte,
// but i couldent get a single file disable to work
'svelte/no-unused-props': 'off',
},
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig,
},
},
},
{
// Override or add rule settings here, such as:
// 'svelte/button-has-type': 'error'
rules: {},
}
);
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
"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 --check .",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.837.0",
"@aws-sdk/s3-request-presigner": "^3.837.0",
"@eslint/js": "^10.0.1",
"@oslojs/crypto": "^1.0.1",
"@oslojs/encoding": "^1.1.0",
"@popperjs/core": "^2.11.8",
Expand All @@ -24,15 +25,20 @@
"@sveltejs/vite-plugin-svelte": "^5.1.0",
"@types/bcryptjs": "^2.4.6",
"@types/luxon": "^3.6.2",
"@types/node": "^24",
"@types/papaparse": "^5.3.16",
"arctic": "^2.3.4",
"autoprefixer": "^10.4.21",
"bcryptjs": "^2.4.3",
"dayjs": "^1.11.13",
"eslint": "^10.4.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.19.0",
"flowbite": "^2.5.2",
"flowbite-svelte": "^0.47.4",
"flowbite-svelte-icons": "^2.2.1",
"fuse.js": "^7.1.0",
"globals": "^17.6.0",
"mongoose": "^8.16.0",
"nanoid": "^5.1.5",
"papaparse": "^5.5.3",
Expand All @@ -48,6 +54,7 @@
"tailwindcss": "^3.4.17",
"tslib": "^2.8.1",
"typescript": "^5.8.3",
"typescript-eslint": "^8.60.1",
"vite": "^6.3.5",
"yup": "^1.6.1"
},
Expand Down
Loading