-
Notifications
You must be signed in to change notification settings - Fork 124
Expand file tree
/
Copy pathoxlint.config.ts
More file actions
72 lines (66 loc) · 2.71 KB
/
oxlint.config.ts
File metadata and controls
72 lines (66 loc) · 2.71 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
import nkzw from '@nkzw/oxlint-config';
import { defineConfig } from 'oxlint';
export default defineConfig({
extends: [nkzw],
// urllib is a Node.js HTTP client library — no React
plugins: ['typescript', 'import', 'unicorn'],
ignorePatterns: ['dist/**', 'test/fixtures/**', 'test/esm/**', 'test/cjs/**', 'test/mts/**'],
rules: {
// Allow console usage in a Node.js library
'no-console': 'off',
// Allow any in internal utility code
'@typescript-eslint/no-explicit-any': 'off',
// Allow require() for CJS compat
'@typescript-eslint/no-require-imports': 'off',
// --- Disable React rules (not a React project) ---
'react/display-name': 'off',
'react/jsx-key': 'off',
'react/jsx-no-comment-textnodes': 'off',
'react/jsx-no-duplicate-props': 'off',
'react/jsx-no-target-blank': 'off',
'react/jsx-no-undef': 'off',
'react/no-children-prop': 'off',
'react/no-danger-with-children': 'off',
'react/no-direct-mutation-state': 'off',
'react/no-find-dom-node': 'off',
'react/no-is-mounted': 'off',
'react/no-render-return-value': 'off',
'react/no-string-refs': 'off',
'react/no-unescaped-entities': 'off',
'react/no-unknown-property': 'off',
'react/require-render-return': 'off',
'react-hooks/rules-of-hooks': 'off',
'react-hooks/exhaustive-deps': 'off',
'react-hooks-js/component-hook-factories': 'off',
'react-hooks-js/config': 'off',
'react-hooks-js/error-boundaries': 'off',
'react-hooks-js/gating': 'off',
'react-hooks-js/globals': 'off',
'react-hooks-js/immutability': 'off',
'react-hooks-js/incompatible-library': 'off',
'react-hooks-js/preserve-manual-memoization': 'off',
'react-hooks-js/purity': 'off',
'react-hooks-js/refs': 'off',
'react-hooks-js/set-state-in-effect': 'off',
'react-hooks-js/set-state-in-render': 'off',
'react-hooks-js/static-components': 'off',
'react-hooks-js/unsupported-syntax': 'off',
'react-hooks-js/use-memo': 'off',
'@nkzw/ensure-relay-types': 'off',
'@nkzw/require-use-effect-arguments': 'off',
// --- Too invasive for an existing codebase ---
// Object/interface sorting would touch every file
'perfectionist/sort-objects': 'off',
'perfectionist/sort-object-types': 'off',
'perfectionist/sort-interfaces': 'off',
'perfectionist/sort-enums': 'off',
'perfectionist/sort-heritage-clauses': 'off',
'perfectionist/sort-jsx-props': 'off',
// Allow instanceof — common pattern in Node.js error handling
'@nkzw/no-instanceof': 'off',
// Library code legitimately uses no-undef globals (Buffer, etc.)
'no-undef': 'off',
// Allow top-level await flexibility
'unicorn/prefer-top-level-await': 'off',
},
});