-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy patheslint.config.mjs
More file actions
executable file
·65 lines (62 loc) · 1.56 KB
/
eslint.config.mjs
File metadata and controls
executable file
·65 lines (62 loc) · 1.56 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import tsParser from '@typescript-eslint/parser';
export default [
{
// Global ignores
ignores: [
'node_modules/**',
'dist/**',
'out/**',
'*.vsix',
'.vscode-test/**',
'.eslintcache',
'**/*.min.js',
'**/*.map',
'webview-ui/dist/**',
'packages/*/dist/**',
'packages/*/lib/**',
],
},
{
files: ['**/*.ts'],
plugins: {
'@typescript-eslint': typescriptEslint,
},
languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: 'module',
},
rules: {
// TypeScript-specific rules
'@typescript-eslint/naming-convention': [
'warn',
{
selector: 'import',
format: ['camelCase', 'PascalCase'],
},
],
// Code quality rules
eqeqeq: 'warn',
'no-throw-literal': 'warn',
'no-unused-vars': 'off', // Use TypeScript's version instead
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
varsIgnorePattern: '^_',
}
],
// Formatting rules (simplified and fixed)
semi: ['warn', 'always'],
quotes: ['warn', 'single'],
curly: ['warn', 'all'], // Always require braces (fixes your error)
'brace-style': ['warn', '1tbs'],
'comma-dangle': ['warn', 'always-multiline'],
indent: ['warn', 2],
'no-trailing-spaces': 'warn',
'eol-last': 'warn',
},
},
];