-
Notifications
You must be signed in to change notification settings - Fork 214
/
Copy path.eslintrc.js
61 lines (61 loc) · 2.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
project: ['./packages/*/tsconfig.json', './examples/*/tsconfig.json'],
tsconfigRootDir: __dirname,
},
plugins: ['@typescript-eslint', 'prettier', 'import', 'jest', 'eslint-plugin-tsdoc'],
extends: [
'airbnb-typescript/base',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:jest/recommended',
'plugin:jest/style',
'prettier',
],
ignorePatterns: ['**/build', '**/node_modules', 'documentation'],
rules: {
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-return': 'warn',
'prettier/prettier': 'error',
'arrow-body-style': ['warn', 'always'],
'tsdoc/syntax': 'warn',
// never allow default export
'import/prefer-default-export': 'off',
// never allow default export
'import/no-default-export': 'error',
// needed to implement streams api :(
'no-underscore-dangle': 0,
},
overrides: [
{
files: ['*.spec.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
},
},
{
files: ['*.js'],
parser: '',
parserOptions: { project: './tsconfig.build.json' },
rules: {
'no-console': 'off',
'prettier/prettier': 'error',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
};