forked from middleapi/orpc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
109 lines (108 loc) · 2.84 KB
/
eslint.config.js
File metadata and controls
109 lines (108 loc) · 2.84 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import antfu from '@antfu/eslint-config'
import pluginBan from 'eslint-plugin-ban'
export default antfu({
formatters: true,
ignores: ['packages/hey-api/tests/client/**'],
rules: {
'pnpm/yaml-enforce-settings': 'off',
'yaml/sort-keys': 'off',
},
}, {
plugins: { ban: pluginBan },
rules: {
'ts/consistent-type-definitions': 'off',
'ts/method-signature-style': ['off'],
'ban/ban': [
'error',
{
name: ['JSON', 'stringify'],
message: 'JSON.stringify can return undefined, use stringifyJSON instead',
},
{
name: ['*', 'bytes'],
message: 'Request/Blob/Response/... .bytes is not widely supported, use readAsBuffer instead',
},
{
name: 'decodeURIComponent',
message: 'decodeURIComponent can throw an error, use tryDecodeURIComponent instead',
},
],
'no-restricted-imports': ['error', {
patterns: [{
group: [
'/json-schema-typed',
'/openapi-types',
'/@standard-schema/spec',
'/compression',
],
message: 'Please import from @orpc/* instead',
}],
paths: [
{
name: '@opentelemetry/api',
allowImportNames: [
'AttributeValue',
'Context',
'ContextAPI',
'Exception',
'PropagationAPI',
'Span',
'SpanOptions',
'SpanStatusCode',
'TraceAPI',
'Tracer',
],
message: 'Require explicit runtime import from @orpc/opentelemetry',
},
],
}],
'pnpm/json-enforce-catalog': 'off',
},
}, {
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.test-d.ts', '**/*.test-d.tsx', 'apps/content/shared/**', 'playgrounds/**', 'packages/*/playground/**'],
rules: {
'unused-imports/no-unused-vars': 'off',
'antfu/no-top-level-await': 'off',
'no-alert': 'off',
'ban/ban': 'off',
},
}, {
files: [
'apps/content/shared/**',
'apps/content/blog/**',
'apps/content/docs/**',
'apps/content/examples/**',
'apps/content/learn-and-contribute/**',
'playgrounds/**',
'packages/*/playground/**',
],
rules: {
'no-restricted-imports': 'off',
'no-console': 'off',
'perfectionist/sort-imports': 'off',
'import/first': 'off',
'ban/ban': 'off',
'no-var': 'off',
'vars-on-top': 'off',
'unicorn/prefer-type-error': 'off',
'antfu/no-import-node-modules-by-path': 'off',
'no-restricted-globals': 'off',
},
}, {
files: ['apps/content/examples/**'],
rules: {
'import/first': 'off',
},
}, {
files: ['playgrounds/**'],
rules: {
'no-alert': 'off',
'eslint-comments/no-unlimited-disable': 'off',
'node/prefer-global/process': 'off',
},
}, {
files: ['playgrounds/nest/**'],
rules: {
'@typescript-eslint/consistent-type-imports': 'off',
},
})