-
Notifications
You must be signed in to change notification settings - Fork 170
Expand file tree
/
Copy pathoxlint.config.ts
More file actions
105 lines (97 loc) · 3.09 KB
/
oxlint.config.ts
File metadata and controls
105 lines (97 loc) · 3.09 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
import type { OxlintConfig } from 'oxlint';
export default {
plugins: ['react', 'typescript', 'jsx-a11y', 'jest'],
ignorePatterns: ['**/*.{mjs,cjs,js,d.ts,d.mts}', '.next', 'storybook-static'],
rules: {
'array-callback-return': 'error',
'no-duplicate-imports': 'error',
'no-var': 'error',
'no-self-compare': 'error',
'no-template-curly-in-string': 'error',
curly: 'error',
'default-case': 'off',
'default-case-last': 'error',
'no-alert': 'error',
'no-console': 'error',
'no-else-return': 'error',
'no-eval': 'error',
'no-lonely-if': 'error',
'no-multi-assign': 'error',
'no-multi-str': 'error',
'no-param-reassign': 'error',
'no-return-assign': 'error',
'no-script-url': 'error',
'no-sequences': 'error',
'no-throw-literal': 'error',
'no-unneeded-ternary': 'error',
'no-useless-call': 'error',
'no-useless-constructor': 'error',
'no-useless-return': 'error',
'operator-assignment': 'error',
'prefer-const': 'error',
'prefer-exponentiation-operator': 'error',
'prefer-object-has-own': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-template': 'error',
radix: 'error',
yoda: 'error',
eqeqeq: ['error', 'smart'],
'no-empty': 'off',
'no-loop-func': 'off',
'no-redeclare': 'off',
'no-undef': 'off',
'no-unused-expressions': 'off',
'no-use-before-define': 'off',
'typescript/ban-ts-comment': 'off',
'typescript/consistent-generic-constructors': 'error',
'typescript/no-deprecated': 'warn',
'typescript/no-empty-object-type': 'off',
'typescript/no-explicit-any': 'off',
'typescript/no-namespace': 'off',
'typescript/no-unsafe-function-type': 'off',
'no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'none',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
'react/button-has-type': 'error',
'react/jsx-boolean-value': 'error',
'react/jsx-curly-brace-presence': [
'error',
{ props: 'never', children: 'never', propElementValues: 'ignore' },
],
'react/jsx-fragments': ['error', 'syntax'],
'react/jsx-no-comment-textnodes': 'error',
'react/jsx-no-duplicate-props': 'error',
'react/jsx-no-target-blank': 'error',
'react/no-children-prop': 'error',
'react/no-find-dom-node': 'error',
'react/no-string-refs': 'error',
'react/self-closing-comp': 'error',
'react/void-dom-elements-no-children': 'error',
'jsx-a11y/anchor-has-content': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/mouse-events-have-key-events': 'off',
'jsx-a11y/no-autofocus': 'off',
'jest/expect-expect': 'off',
'jest/no-export': 'off',
'jest/valid-title': 'off',
},
overrides: [
{
files: ['**/*.story.tsx'],
rules: {
'no-console': 'off',
'react/button-has-type': 'off',
},
},
],
} satisfies OxlintConfig;