-
Notifications
You must be signed in to change notification settings - Fork 5
/
.eslintrc.js
58 lines (56 loc) · 1.86 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
module.exports = {
env: {
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
plugins: ['@typescript-eslint', 'import'],
rules: {
// TypeScript
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/camelcase': 0,
'@typescript-eslint/explicit-function-return-type': 2,
'@typescript-eslint/explicit-module-boundary-types': 0,
// Turning off, because it conflicts with prettier
'@typescript-eslint/indent': ['off'],
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
// Leave vars as 'all' to force everything to be handled when pattern matching
// Variables can be ignored by prefixing with an '_'
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', vars: 'all' }],
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/no-var-requires': 0,
// eslint-plugin-import
'import/namespace': [2, { allowComputed: true }],
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'sibling', 'parent', 'index', 'object', 'type'],
pathGroups: [{ pattern: 'mock-utils', group: 'builtin', patternOptions: { matchBase: true, nocomment: true } }],
},
],
// ESLint
'comma-dangle': [2, 'only-multiline'],
eqeqeq: ['error', 'smart'],
indent: 'off',
'no-console': 0,
'no-useless-escape': 0,
semi: 2,
'sort-imports': [
'error',
{
ignoreDeclarationSort: true,
},
],
},
};