-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathoxlint.config.ts
More file actions
62 lines (61 loc) · 1.74 KB
/
oxlint.config.ts
File metadata and controls
62 lines (61 loc) · 1.74 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
import { defineConfig } from 'oxlint';
export default defineConfig({
options: {
typeAware: true,
},
plugins: ['react', 'jsx-a11y', 'typescript', 'import', 'unicorn', 'oxc', 'vitest', 'promise'],
categories: {
correctness: 'error',
suspicious: 'warn',
perf: 'warn',
style: 'off',
},
env: {
browser: true,
builtin: true,
},
rules: {
'import/no-unassigned-import': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': ['error', { extensions: ['.tsx', '.jsx'] }],
'react/rules-of-hooks': 'error',
'react/exhaustive-deps': 'error',
'react/iframe-missing-sandbox': 'off',
'jsx-a11y/no-autofocus': 'off',
'jsx-a11y/prefer-tag-over-role': 'off',
'typescript/no-explicit-any': 'error',
'typescript/consistent-type-imports': 'error',
'typescript/only-throw-error': 'error',
'typescript/no-unsafe-type-assertion': 'off',
'typescript/no-floating-promises': 'off',
'typescript/no-unnecessary-type-arguments': 'off',
'oxc/no-map-spread': 'off',
'promise/always-return': 'off',
},
overrides: [
{
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
rules: {
'typescript/no-unused-vars': [
'error',
{
args: 'after-used',
ignoreRestSiblings: true,
vars: 'all',
},
],
'typescript/no-shadow': 'error',
},
},
{
files: ['**/*.test.ts', '**/*.test.tsx'],
rules: {
'typescript/unbound-method': 'off',
'typescript/no-unsafe-enum-comparison': 'off',
},
},
],
});