Fix issues and add linting
This commit is contained in:
34
eslint.config.js
Normal file
34
eslint.config.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import js from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
export default tseslint.config(
|
||||
// Global ignores
|
||||
{
|
||||
ignores: [
|
||||
'dist/**',
|
||||
'server/dist/**',
|
||||
'.astro/**',
|
||||
'node_modules/**',
|
||||
'scripts/**',
|
||||
],
|
||||
},
|
||||
|
||||
// Base recommended rules
|
||||
js.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
|
||||
// Project-wide overrides
|
||||
{
|
||||
rules: {
|
||||
// Allow unused vars/args when prefixed with _
|
||||
'@typescript-eslint/no-unused-vars': ['warn', {
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
}],
|
||||
// Empty catch blocks are intentional in this codebase (fail-through patterns)
|
||||
'no-empty': ['error', { allowEmptyCatch: true }],
|
||||
// We use unknown instead of any; warn when any slips in
|
||||
'@typescript-eslint/no-explicit-any': 'warn',
|
||||
},
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user