forked from PoweredLocal/typescript-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
60 lines (59 loc) · 1.64 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
53
54
55
56
57
58
59
60
const path = require('path');
module.exports = {
root: true,
plugins: ['prettier', '@typescript-eslint', 'import', 'jest'],
overrides: [
{
files: '*.js',
extends: ['eslint-config-airbnb/base', 'prettier']
},
{
files: '*.ts',
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
project: [
'./services/*/tsconfig.build.json',
'./libs/*/tsconfig.build.json'
]
},
settings: {
'import/external-module-folders': [
'./node_modules',
'./node_modules/@types'
],
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.d.ts', '.tsx'],
moduleDirectory: [
'node_modules',
'node_modules/@types',
path.resolve(path.join(__dirname, 'node_modules')),
path.resolve(path.join(__dirname, 'node_modules', '@types')),
'src'
]
}
}
},
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jest/all',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'prettier/@typescript-eslint',
'prettier'
],
rules: {
'no-param-reassign': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' }
]
}
}
]
};