-
-
Notifications
You must be signed in to change notification settings - Fork 96
Expand file tree
/
Copy patheslint.config.mjs
More file actions
80 lines (78 loc) · 1.97 KB
/
eslint.config.mjs
File metadata and controls
80 lines (78 loc) · 1.97 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
// @ts-check
import globals from 'globals'
import tseslint from 'typescript-eslint'
import { defineConfig } from 'eslint/config'
import js from '@eslint/js'
import eslintConfigPrettier from 'eslint-config-prettier/flat'
export default defineConfig(
{
ignores: [
'packages/*/**/lib/',
'packages/*/**/es/',
'packages/*/**/dist/',
'**/build/',
'**/*.min.js',
'**/bundle.js',
'**/coverage/',
'**/vendor/',
],
},
js.configs.recommended,
{
plugins: {
'@typescript-eslint': tseslint.plugin,
},
languageOptions: {
globals: {
...globals.browser,
...globals.node,
...globals.mocha,
},
ecmaVersion: 2022,
sourceType: 'module',
parser: tseslint.parser,
parserOptions: {
ecmaVersion: 2022,
projectService: true,
projectFolderIgnoreList: [
'!packages/node_modules/**',
'packages/*/**/node_modules/**',
],
},
},
linterOptions: {
reportUnusedDisableDirectives: 'error',
},
rules: {
'linebreak-style': ['error', 'unix'],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'after-used',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'off',
'import/export': 'off',
'no-dupe-class-members': 'off',
'no-empty-pattern': 'off',
'no-redeclare': 'off',
'no-undef': 'off',
'no-unused-expressions': 'off',
'no-use-before-define': 'off',
'no-useless-constructor': 'off',
},
},
eslintConfigPrettier,
{
// disable type-aware linting on JS files
files: ['**/*.{js,cjs,mjs,jsx}'],
extends: [tseslint.configs.disableTypeChecked],
}
)