-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
76 lines (76 loc) · 2.13 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module.exports = {
extends: ['plugin:import/errors', 'plugin:import/typescript', 'prettier', 'plugin:eslint-comments/recommended'],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint/eslint-plugin'],
rules: {
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/prefer-ts-expect-error': 'error',
'import/default': 'off',
'import/order': 'error',
'no-dupe-class-members': 'off',
'@typescript-eslint/explicit-module-boundary-types': 2,
'no-unused-vars': 'off'
}
},
{
files: ['*.md'],
rules: {
'arrow-body-style': 0,
'consistent-return': 0,
'import/no-extraneous-dependencies': 0,
'import/no-unresolved': 0,
'jest/no-focused-tests': 0,
'jest/no-identical-title': 0,
'jest/valid-expect': 0,
'no-undef': 0,
'no-unused-vars': 0,
'prettier/prettier': 0,
'sort-keys': 0
}
},
{
files: ['**/__tests__/**', '**/__mocks__/**'],
rules: {
'@typescript-eslint/explicit-module-boundary-types': 0
}
}
],
parser: '@typescript-eslint/parser',
plugins: ['markdown', 'import', 'prettier', 'eslint-comments'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
rules: {
'arrow-body-style': 2,
'eslint-comments/no-unused-disable': 2,
'import/no-duplicates': 2,
'import/no-extraneous-dependencies': [
2,
{
devDependencies: ['**/__tests__/**']
}
],
'import/no-unresolved': [2, { ignore: ['fsevents', 'aws-lambda'] }],
'import/order': 2,
'no-console': 2,
'no-restricted-imports': [
2,
{
message: 'Please use graceful-fs instead.',
name: 'fs'
}
],
'no-unused-vars': 2,
'prettier/prettier': 2,
'sort-imports': [2, { ignoreDeclarationSort: true }]
}
}