-
Notifications
You must be signed in to change notification settings - Fork 208
/
eslint.config.mjs
42 lines (40 loc) · 1.17 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
// @ts-check
import eslint from '@eslint/js'
import prettierRecommended from 'eslint-plugin-prettier/recommended'
import tseslint from 'typescript-eslint'
import globals from 'globals'
export default tseslint.config(
{
ignores: ['dist', 'jest.config.ts'],
},
eslint.configs.recommended,
...tseslint.configs.strictTypeChecked,
prettierRecommended,
{
languageOptions: {
globals: globals.node,
parserOptions: {
project: './tsconfig.json',
tsconfigDirName: import.meta.dirname,
},
},
linterOptions: {
reportUnusedDisableDirectives: 'warn',
},
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
},
},
{
// Once we remove the legacy vows tests in ./test, we can remove these JS-specific rules
files: ['test/**/*.js', 'eslint.config.mjs'],
...tseslint.configs.disableTypeChecked,
rules: {
...tseslint.configs.disableTypeChecked.rules,
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
)