-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
46 lines (39 loc) · 877 Bytes
/
.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
const typescriptExtends = [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:node/recommended-module',
'prettier'
];
const typescriptPlugins = ['eslint-plugin-tsdoc'];
const tsdocRules = {
'tsdoc/syntax': 'warn'
};
const tryExtensions = ['.d.ts', '.ts', '.js', '.json'];
const config = {};
const overrides = [];
overrides.push({
extends: typescriptExtends,
files: ['./src/*.ts'],
plugins: [...typescriptPlugins],
rules: {
...tsdocRules
},
settings: {
node: {
tryExtensions
}
}
});
config.env = {
es6: true,
node: true
};
config.extends = ['eslint:recommended', 'plugin:node/recommended', 'prettier'];
config.overrides = overrides;
config.parserOptions = {
ecmaVersion: 'latest',
sourceType: 'module'
};
config.root = true;
module.exports = config;