-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy patheslint.config.ts
More file actions
34 lines (31 loc) · 1.19 KB
/
eslint.config.ts
File metadata and controls
34 lines (31 loc) · 1.19 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
import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import { defineConfig, globalIgnores } from 'eslint/config';
export default defineConfig([
globalIgnores(['src/3rdparty/']),
{ files: ['**/*.{js,mjs,cjs,ts,mts,cts}'], plugins: { js }, extends: ['js/recommended'], languageOptions: { globals: globals.browser } },
tseslint.configs.recommended,
{
rules: {
indent: ['error', 4, { SwitchCase: 1 }],
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
'no-constant-condition': ['error', { checkLoops: false }],
'no-case-declarations': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_'
}
]
}
}
]);