-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
47 lines (46 loc) · 1.21 KB
/
eslint.config.js
File metadata and controls
47 lines (46 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// ESLint v9 flat config
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import eslintPluginJs from '@eslint/js';
export default [
// Ignore patterns replacing legacy .eslintignore
{
ignores: ['dist', 'node_modules', '.sst', 'sst.config.ts'],
},
// Base JS recommended rules
eslintPluginJs.configs.recommended,
// TypeScript-specific configuration
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
ecmaVersion: 2023,
sourceType: 'module',
parser: typescriptParser,
parserOptions: {
project: false,
},
globals: {
process: 'readonly',
console: 'readonly',
URL: 'readonly',
},
},
plugins: {
'@typescript-eslint': typescriptEslintPlugin,
},
rules: {
// Keep defaults reasonable; adjust as needed
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-expect-error': false }],
},
},
{
files: ['sst.config.ts'],
languageOptions: {
globals: {
$config: 'readonly',
},
},
},
];