-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
47 lines (45 loc) · 1.12 KB
/
eslint.config.mjs
File metadata and controls
47 lines (45 loc) · 1.12 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
import js from '@eslint/js'
import globals from 'globals'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import tseslint from 'typescript-eslint'
import { defineConfig } from 'eslint/config'
/**
* @type {Partial<RulesConfig>}
*/
const customRules = {
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/explicit-member-accessibility': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
// semi: ['error', 'never'],
curly: ['error', 'all'],
'no-console': 'error',
}
export default defineConfig([
{
ignores: ['dist/', 'coverage/', 'eslint.config.mjs'],
},
js.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
files: ['**/*.ts'],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: import.meta.dirname,
},
globals: {
...globals.node,
...globals.vitest,
},
},
rules: customRules,
},
])