-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy patheslint.config.js
More file actions
50 lines (49 loc) · 1.35 KB
/
eslint.config.js
File metadata and controls
50 lines (49 loc) · 1.35 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
const eslint = require('@eslint/js');
const tseslint = require('typescript-eslint');
const eslintConfigPrettier = require('eslint-config-prettier');
const globals = require('globals');
module.exports = tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintConfigPrettier,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
},
},
{
rules: {
'no-return-await': 'off',
'no-console': ['warn'],
'@typescript-eslint/return-await': ['warn', 'in-try-catch'],
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': [
'warn',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
},
},
{
files: ['**/*.spec.ts', '**/*.test.ts', '**/__tests__/**/*.ts', 'scripts/**/*.ts'],
rules: {
'no-console': 'off',
},
},
{
ignores: ['eslint.config.js', 'migration/**/*.js', 'scripts/*.js', 'dist/**', 'node_modules/**'],
},
);