-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy patheslint.config.js
64 lines (63 loc) · 1.73 KB
/
eslint.config.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
import antfu from '@antfu/eslint-config'
import pluginBan from 'eslint-plugin-ban'
export default antfu({
react: true,
formatters: true,
}, {
plugins: { ban: pluginBan },
rules: {
'ts/consistent-type-definitions': 'off',
'react-refresh/only-export-components': 'off',
'react/prefer-destructuring-assignment': 'off',
'react/no-context-provider': 'off',
'ts/method-signature-style': ['off'],
'ban/ban': [
'error',
{
name: ['JSON', 'stringify'],
message: 'JSON.stringify can return undefined, use stringifyJSON instead',
},
],
'no-restricted-imports': ['error', {
patterns: [{
group: [
'json-schema-typed',
'json-schema-typed/*',
'openapi-types',
'openapi-types/*',
'@standard-schema/spec',
'@standard-schema/spec/*',
],
message: 'Please import from @orpc/* instead',
}],
}],
},
}, {
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',
'react-hooks/rules-of-hooks': 'off',
'no-alert': 'off',
'ban/ban': 'off',
},
}, {
files: ['apps/content/shared/**', 'apps/content/docs/**', 'apps/content/examples/**', 'playgrounds/**', 'packages/*/playground/**'],
rules: {
'no-console': 'off',
'perfectionist/sort-imports': 'off',
'import/first': 'off',
'react-hooks/rules-of-hooks': 'off',
'ban/ban': 'off',
},
}, {
files: ['apps/content/examples/**'],
rules: {
'import/first': 'off',
},
}, {
files: ['playgrounds/**'],
rules: {
'no-alert': 'off',
},
})