Files
marktvogt.de/web/eslint.config.js
vikingowl 6b23cc330e feat: add Prettier, ESLint, and pre-commit hooks
- Add Prettier with svelte and tailwindcss plugins
- Add ESLint with typescript-eslint and eslint-plugin-svelte
- Add pre-commit hooks (trailing-whitespace, end-of-file-fixer,
  check-yaml, check-json, no-commit-to-branch, prettier, eslint,
  svelte-check)
- Add format, format:check, lint, lint:fix scripts to package.json
- Rename CI typecheck step to lint, add format:check and lint commands
- Fix ESLint issues: unused imports, Leaflet type import, extract
  JSON-LD from {@html} template literals to script-block variables
2026-02-23 05:33:44 +01:00

47 lines
989 B
JavaScript

import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';
export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' }
]
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser
}
},
rules: {
'svelte/no-at-html-tags': 'off',
'svelte/no-navigation-without-resolve': 'off',
'svelte/require-each-key': 'off',
'svelte/prefer-svelte-reactivity': 'off'
}
},
{
ignores: ['build/', '.svelte-kit/', 'node_modules/', 'deploy/']
}
);