-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
40 lines (36 loc) · 1.12 KB
/
eslint.config.js
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
import eslint from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tseslintParser from '@typescript-eslint/parser';
import { FlatCompat } from '@eslint/eslintrc';
const compat = new FlatCompat();
export default [
eslint.configs.recommended,
...compat.extends('plugin:@typescript-eslint/recommended'),
{
files: ['**/*.ts'],
languageOptions: {
parser: tseslintParser,
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
// TypeScript specific rules
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
// General rules
'no-debugger': 'warn',
'no-duplicate-imports': 'error',
'no-unused-vars': 'off', // Turned off in favor of @typescript-eslint/no-unused-vars
},
},
{
ignores: ['dist/**', 'node_modules/**'],
},
];