-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
90 lines (84 loc) · 2.2 KB
/
index.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
'use strict'
const OFF = 0
const WARN = 1
const ERROR = 2
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
rules: {
'no-console': [WARN, { allow: ['error', 'info', 'warn'] }],
'@typescript-eslint/explicit-function-return-type': [
'warn',
{ allowExpressions: true },
],
'@typescript-eslint/no-use-before-define': [ERROR, { functions: false }],
'import/no-absolute-path': ERROR,
'import/no-self-import': ERROR,
'import/no-useless-path-segments': WARN,
'import/no-unused-modules': WARN,
'import/no-deprecated': WARN,
'import/no-extraneous-dependencies': WARN,
'import/no-mutable-exports': WARN,
'import/first': WARN,
'import/order': [
2,
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
pathGroups: [
{
pattern: '@profiscience/**',
group: 'internal',
position: 'before',
},
],
pathGroupsExcludedImportTypes: [],
'newlines-between': 'always-and-inside-groups',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'import/newline-after-import': WARN,
},
overrides: [
{
files: [
'**/__test__/**/*',
'**/__tests__/**/*',
'**/test/**/*',
'**/tests/**/*',
'**/test.*',
],
rules: {
'@typescript-eslint/explicit-function-return-type': OFF,
'@typescript-eslint/no-empty-function': OFF,
'@typescript-eslint/no-explicit-any': OFF,
},
},
{
files: ['**/*.ts', '**/*.tsx', '**/*.d.ts'],
rules: {
'import/no-unresolved': OFF,
'import/named': OFF,
'import/namespaced': OFF,
'import/default': OFF,
'import/export': OFF,
},
},
],
}