-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
61 lines (61 loc) · 1.73 KB
/
.eslintrc.cjs
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 = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
parser: {
ts: '@typescript-eslint/parser',
js: '@typescript-eslint/parser',
},
},
plugins: ['no-relative-import-paths', 'prettier'],
extends: ['plugin:@typescript-eslint/recommended'],
root: true,
env: {
browser: true,
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'src/**/*.test.tsx', 'src/**/*.test.ts'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-namespace': 'off',
'no-undef': ['error'],
'no-relative-import-paths/no-relative-import-paths': ['error'],
'no-console': ['error', { allow: ['warn', 'error'] }],
camelcase: ['error', { properties: 'never', ignoreDestructuring: true }],
'prettier/prettier': 'error',
'no-restricted-imports': [
'error',
{
patterns: [
{
group: ['src/*'],
message: 'src/ should use the @src/ alias instead',
},
{
group: ['*__exports*'],
message: '__exports/ should not be used for imports',
},
],
},
],
},
overrides: [
{
files: ['jest.config.js'],
},
{
files: ['**/?(*.)+(spec|test).[jt]s?(x)'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'no-restricted-imports': 'off',
},
},
],
};