generated from Rethunk-Tech/mcp-template-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
44 lines (39 loc) · 1.04 KB
/
eslint.config.mjs
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
import eslint from '@eslint/js'
import globals from 'globals'
import tseslint from 'typescript-eslint'
// Define which files are TypeScript files
const tsFiles = ['src/**/*.ts']
export default [
// Base configuration for all files
{
ignores: ['node_modules/**', 'build/**', '.yarn/**']
},
eslint.configs.recommended,
// TypeScript specific configuration
...tseslint.configs.recommended,
// Custom configuration for TypeScript files
{
files: tsFiles,
languageOptions: {
globals: {
...globals.node
},
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 'latest',
sourceType: 'module'
}
},
rules: {
// Core ESLint rules
'indent': ['error', 2],
'linebreak-style': ['error', 'unix'],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
// TypeScript specific rules
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/no-explicit-any': 'error'
}
}
]