-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
40 lines (39 loc) · 1.13 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
40
/* eslint-env node */
const eslint = require('@eslint/js')
const tseslint = require('typescript-eslint')
const globals = require('globals')
module.exports = tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
ecmaVersion: 6,
parserOptions: {
project: './tsconfig.eslint.json',
},
globals: {
...globals.browser,
...globals.node,
},
},
plugins: { tseslint: tseslint.plugin },
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'require-await': 'error',
},
},
{
files: ['**/*.e2e.ts', '**/*.test.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 'off',
},
},
{
files: ['eslint.config.js', '.prettierrc.js', '.commitlintrc.ts'],
rules: {
'@typescript-eslint/no-require-imports': 'off',
},
}
)