-
Notifications
You must be signed in to change notification settings - Fork 17
/
.eslintrc.js
52 lines (51 loc) · 1.21 KB
/
.eslintrc.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
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
parser: 'babel-eslint',
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'prettier',
],
env: { node: true, es6: true, jest: true },
plugins: ['prettier', 'import'],
rules: {
'prettier/prettier': [
'error',
{
trailingComma: 'es5',
singleQuote: true,
},
],
'no-console': 'off', // just use console :P
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
'babel-module': {},
typescript: {},
},
},
overrides: [
{
files: ['**/*.ts'],
extends: ['plugin:@typescript-eslint/recommended'],
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/no-misused-promises': [
'error', // Helps capturing errors like if(someAsyncFunc())
{
checksVoidReturn: false, // Allow setTimeout(async () => {})
},
],
},
// Required by rules that requires type information.
// Ref: https://typescript-eslint.io/linting/typed-linting/
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
},
},
],
};