-
-
Notifications
You must be signed in to change notification settings - Fork 60
Expand file tree
/
Copy path.oxlintrc.json
More file actions
92 lines (90 loc) · 2.84 KB
/
Copy path.oxlintrc.json
File metadata and controls
92 lines (90 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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["typescript", "import", "jsdoc", "vitest"],
"jsPlugins": [
{
"name": "sdk",
"specifier": "@sentry/eslint-plugin-sdk"
}
],
"env": {
"es2017": true,
"node": true
},
"options": {
"typeAware": true
},
"ignorePatterns": [
"**/dist/**",
"/esm/**",
"/scripts/**",
"/preload/**",
"/main/**",
"/renderer/**",
"/examples/**",
"/common/**",
"/native/**",
"/index.*",
"/integrations.*",
"/utility/**"
],
"rules": {
"no-unused-vars": [
"warn",
{ "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "caughtErrorsIgnorePattern": "^_" }
],
// === Base rules from eslint-config-sdk/base.js ===
"no-console": "error",
"no-alert": "error",
"no-param-reassign": "error",
"prefer-template": "error",
"no-bitwise": "error",
"complexity": ["error", { "max": 33 }],
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
"guard-for-in": "error",
"array-callback-return": ["error", { "allowImplicit": true }],
"quotes": ["error", "single", { "avoidEscape": true }],
"no-return-await": "error",
"max-lines": ["error", { "max": 300, "skipComments": true, "skipBlankLines": true }],
// === Custom SDK rules (via JS plugin) ===
"sdk/no-eq-empty": "error"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx", "**/*.d.ts"],
"rules": {
"typescript/ban-ts-comment": "error",
"typescript/consistent-type-imports": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/prefer-for-of": "error",
"typescript/no-floating-promises": ["error", { "ignoreVoid": true }],
"typescript/no-dynamic-delete": "error",
"typescript/no-unsafe-member-access": "error",
"typescript/unbound-method": "error",
"typescript/no-explicit-any": "error",
"typescript/no-empty-function": "off",
"typescript/prefer-optional-chain": ["error"],
"typescript/no-redundant-type-constituents": "off",
"typescript/restrict-template-expressions": "off",
"typescript/await-thenable": "warn",
"typescript/no-base-to-string": "warn",
"no-restricted-globals": ["error", "window", "document", "location", "navigator"],
"sdk/no-class-field-initializers": "error",
"sdk/no-regexp-constructor": "error"
}
},
{
"files": ["test/**"],
"rules": {
"no-console": "off",
"no-unused-expressions": "off",
"no-unsafe-optional-chaining": "off",
"max-lines": "off",
"vitest/no-conditional-tests": "off",
"typescript/no-explicit-any": "off",
"typescript/no-floating-promises": "off",
"typescript/no-unsafe-member-access": "off"
}
}
]
}