-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
44 lines (41 loc) · 1.11 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
const jsConfigurations = ['eslint:recommended'];
const tsConfigurations = [
...jsConfigurations,
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
];
const tsRules = {
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
};
const testConfigurations = ['plugin:mocha/recommended'];
module.exports = {
parserOptions: {
project: ['./tsconfig-lint.json'],
},
plugins: ['@typescript-eslint', 'mocha'],
env: { node: true },
overrides: [
{
parserOptions: {
ecmaVersion: 2018,
},
files: ['**/*.js'],
env: { node: true, es6: true },
extends: [...jsConfigurations, 'prettier'],
},
{
parser: '@typescript-eslint/parser',
files: ['**/*.ts'],
extends: [...tsConfigurations, 'prettier'],
rules: { ...tsRules },
},
{
files: ['**/*.spec.js', '**/*.spec.ts'],
env: { mocha: true },
extends: [...testConfigurations],
},
],
};