Repository navigation
Expand file tree
/
Copy path.oxlintrc.jsonc
More file actions
58 lines (58 loc) · 2.03 KB
/
Copy path.oxlintrc.jsonc
File metadata and controls
58 lines (58 loc) · 2.03 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
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": [".cache/*", "dist/*", "storybook-static/*", "**/node_modules/*"],
"plugins": [
"import",
"jsdoc",
"jsx-a11y",
"oxc",
"react",
"react-perf",
"typescript",
"unicorn",
"vitest",
],
"categories": {
"perf": "warn",
"suspicious": "warn",
},
"rules": {
// Prefer named exports over default exports for better refactorability and IDE support
"import/no-default-export": "warn",
// Not needed with the React 17+ automatic JSX runtime
"react/react-in-jsx-scope": "off",
},
"overrides": [
{
// Tooling config files, the Storybook config directory, and story files conventionally
// use default exports (config objects, story metadata) and side-effect imports (CSS,
// setup files, Storybook addons)
"files": [
"./*.config.{js,ts,mjs,mts}",
"./*.setup.{js,ts,mjs,mts}",
"./.storybook/**/*.{ts,tsx}",
"./stories/**/*.{story,stories}.tsx",
],
"rules": {
"import/no-default-export": "off",
"import/no-unassigned-import": "off",
},
},
{
// Tests routinely pass inline arrays as props for assertions and setup; the perf
// rule's referential-stability concern doesn't apply in a test environment
"files": ["**/*.test.{ts,tsx}"],
"rules": {
"react-perf/jsx-no-new-array-as-prop": "off",
},
},
{
// Unified plugins are invoked by the processor via `.use()`, which binds `this` to
// the Processor instance; the bundler-`undefined`-`this` concern doesn't apply here
"files": ["src/serializers/html/plugins/*.ts"],
"rules": {
"oxc/no-this-in-exported-function": "off",
},
},
],
}