Skip to content
Open
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
16 changes: 15 additions & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';

const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));

export default ts.config(
Expand All @@ -24,11 +25,24 @@ export default ts.config(
},
{
files: ['**/*.svelte'],

languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
rules: {
indent: ['error', 4], // Enforce 4-space indentation
semi: ['error', 'always'], // Require semicolons
quotes: ['error', 'single', { avoidEscape: true }], // Use single quotes
'object-curly-spacing': ['error', 'always'], // Require spaces inside object braces
'comma-dangle': ['error', 'always-multiline'], // Require trailing commas in multiline lists
'arrow-parens': ['error', 'always'], // Require parentheses in arrow functions
'no-trailing-spaces': ['error'], // Disallow trailing spaces
'max-len': ['warn', { code: 120 }], // Warn if a line exceeds 120 characters
'no-multiple-empty-lines': ['error', { max: 1 }], // Allow only one empty line
'key-spacing': ['error', { beforeColon: false, afterColon: true }] // Enforce spaces after colons in objects
}
}
);