Skip to content

Commit c0a3649

Browse files
csandmanclaude
andauthored
chore: Replace eslint/prettier with oxlint/oxfmt (#409)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7c2838a commit c0a3649

31 files changed

Lines changed: 3943 additions & 8061 deletions

.oxfmtrc.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"printWidth": 80,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": false,
7+
"trailingComma": "es5",
8+
"sortImports": {
9+
"customGroups": [
10+
{
11+
"groupName": "react",
12+
"elementNamePattern": ["react"]
13+
},
14+
{
15+
"groupName": "chakra-react",
16+
"elementNamePattern": ["@chakra-ui/react"]
17+
},
18+
{
19+
"groupName": "chakra",
20+
"elementNamePattern": ["@chakra-ui/**"]
21+
}
22+
],
23+
"groups": [
24+
"react",
25+
"chakra-react",
26+
"chakra",
27+
["builtin", "external"],
28+
["parent", "sibling", "index"],
29+
"unknown"
30+
],
31+
"newlinesBetween": false,
32+
"ignoreCase": false
33+
},
34+
"sortPackageJson": true
35+
}

.oxlintrc.json

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": [
4+
"eslint",
5+
"typescript",
6+
"unicorn",
7+
"react",
8+
"react-perf",
9+
"oxc",
10+
"import",
11+
"jsdoc",
12+
"jsx-a11y",
13+
"node",
14+
"promise"
15+
],
16+
"categories": {
17+
"correctness": "error",
18+
"suspicious": "warn",
19+
"pedantic": "warn",
20+
"perf": "warn",
21+
"style": "warn",
22+
"restriction": "off"
23+
},
24+
"options": {
25+
"typeAware": true
26+
},
27+
"env": {
28+
"builtin": true,
29+
"browser": true,
30+
"es2026": true
31+
},
32+
"ignorePatterns": ["codemod/", "demo/"],
33+
"rules": {
34+
"@typescript-eslint/consistent-type-imports": [
35+
"warn",
36+
{
37+
"prefer": "type-imports",
38+
"disallowTypeAnnotations": true
39+
}
40+
],
41+
"@typescript-eslint/no-dynamic-delete": "error",
42+
"@typescript-eslint/no-empty-object-type": "error",
43+
"@typescript-eslint/no-explicit-any": "error",
44+
"@typescript-eslint/no-import-type-side-effects": "warn",
45+
"@typescript-eslint/no-invalid-void-type": "error",
46+
"@typescript-eslint/no-namespace": "error",
47+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
48+
"@typescript-eslint/no-non-null-assertion": "warn",
49+
"@typescript-eslint/no-require-imports": "error",
50+
"@typescript-eslint/non-nullable-type-assertion-style": "warn",
51+
"curly": ["error", "all"],
52+
"no-alert": "error",
53+
"no-console": "error",
54+
"no-empty": "error",
55+
"no-empty-function": "warn",
56+
"no-eq-null": "error",
57+
"no-param-reassign": "error",
58+
"no-proto": "error",
59+
"no-regex-spaces": "warn",
60+
"no-sequences": "error",
61+
"no-unused-vars": ["error", { "ignoreRestSiblings": true }],
62+
"no-var": "error",
63+
"no-void": "warn",
64+
"prefer-const": "error",
65+
"prefer-rest-params": "error",
66+
"prefer-spread": "error",
67+
"unicode-bom": "error",
68+
"import/no-cycle": "error",
69+
"import/no-duplicates": "warn",
70+
"jsdoc/empty-tags": "warn",
71+
"oxc/bad-bitwise-operator": "error",
72+
"promise/catch-or-return": "error",
73+
"react/jsx-filename-extension": ["error", { "extensions": [".tsx"] }],
74+
"react/no-clone-element": "warn",
75+
"react/no-danger": "error",
76+
"react/no-react-children": "error",
77+
"react/no-unknown-property": "error",
78+
"unicorn/no-abusive-eslint-disable": "warn",
79+
"unicorn/no-array-for-each": "warn",
80+
"unicorn/no-array-reduce": "warn",
81+
"unicorn/no-length-as-slice-end": "warn",
82+
"unicorn/no-magic-array-flat-depth": "warn",
83+
"unicorn/prefer-modern-math-apis": "warn",
84+
"unicorn/prefer-module": "warn",
85+
"unicorn/prefer-node-protocol": "warn",
86+
"unicorn/prefer-number-properties": "warn",
87+
88+
"@typescript-eslint/ban-types": "off",
89+
"@typescript-eslint/no-misused-spread": "off",
90+
"@typescript-eslint/no-unsafe-assignment": "off",
91+
"@typescript-eslint/no-unsafe-member-access": "off",
92+
"@typescript-eslint/no-unsafe-type-assertion": "off",
93+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
94+
"@typescript-eslint/strict-boolean-expressions": "off",
95+
"capitalized-comments": "off",
96+
"id-length": "off",
97+
"import/exports-last": "off",
98+
"import/group-exports": "off",
99+
"import/no-named-export": "off",
100+
"import/prefer-default-export": "off",
101+
"jsdoc/check-tag-names": "off",
102+
"jsdoc/require-param": "off",
103+
"jsdoc/require-param-description": "off",
104+
"jsdoc/require-param-name": "off",
105+
"jsdoc/require-param-type": "off",
106+
"jsdoc/require-returns": "off",
107+
"jsdoc/require-returns-description": "off",
108+
"jsdoc/require-returns-type": "off",
109+
"jsx-a11y/prefer-tag-over-role": "off",
110+
"max-lines": "off",
111+
"max-lines-per-function": "off",
112+
"max-statements": "off",
113+
"no-duplicate-imports": "off",
114+
"no-implicit-coercion": "off",
115+
"no-inline-comments": "off",
116+
"no-magic-numbers": "off",
117+
"no-ternary": "off",
118+
"promise/prefer-await-to-callbacks": "off",
119+
"react/jsx-max-depth": "off",
120+
"react/jsx-props-no-spreading": "off",
121+
"react/react-in-jsx-scope": "off",
122+
"react-perf/jsx-no-new-function-as-prop": "off",
123+
"sort-imports": "off",
124+
"sort-keys": "off",
125+
"unicorn/no-null": "off"
126+
},
127+
"overrides": []
128+
}

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierrc

Lines changed: 0 additions & 29 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"oxc.oxc-vscode",
4+
"zizmor.zizmor-vscode",
5+
"editorconfig.editorconfig",
6+
"github.vscode-github-actions"
7+
]
8+
}

.vscode/settings.json

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
11
{
2-
"typescript.tsdk": "node_modules/typescript/lib"
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"editor.defaultFormatter": "oxc.oxc-vscode",
4+
"editor.formatOnSave": true,
5+
"files.associations": {
6+
".npmrc": "ini"
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "oxc.oxc-vscode"
10+
},
11+
"[jsonc]": {
12+
"editor.defaultFormatter": "oxc.oxc-vscode"
13+
},
14+
"[javascript]": {
15+
"editor.defaultFormatter": "oxc.oxc-vscode"
16+
},
17+
"[typescript]": {
18+
"editor.defaultFormatter": "oxc.oxc-vscode"
19+
},
20+
"[typescriptreact]": {
21+
"editor.defaultFormatter": "oxc.oxc-vscode"
22+
},
23+
"[markdown]": {
24+
"editor.defaultFormatter": "oxc.oxc-vscode"
25+
},
26+
"[html]": {
27+
"editor.defaultFormatter": "oxc.oxc-vscode"
28+
}
329
}

README.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
[CS-TS]:
2-
https://img.shields.io/badge/CodeSandbox-TypeScript-047bd4?logo=codesandbox&style=flat&labelColor=040404&logoColor=DBDBDB
3-
"CodeSandbox TypeScript Demo"
4-
[CS-JS]:
5-
https://img.shields.io/badge/CodeSandbox-JavaScript-f4dc1b?logo=codesandbox&style=flat&labelColor=040404&logoColor=DBDBDB
6-
"CodeSandbox JavaScript Demo"
7-
[SB-TS]:
8-
https://developer.stackblitz.com/img/open_in_stackblitz.svg
9-
"StackBlitz Demo"
1+
[CS-TS]: https://img.shields.io/badge/CodeSandbox-TypeScript-047bd4?logo=codesandbox&style=flat&labelColor=040404&logoColor=DBDBDB "CodeSandbox TypeScript Demo"
2+
[CS-JS]: https://img.shields.io/badge/CodeSandbox-JavaScript-f4dc1b?logo=codesandbox&style=flat&labelColor=040404&logoColor=DBDBDB "CodeSandbox JavaScript Demo"
3+
[SB-TS]: https://developer.stackblitz.com/img/open_in_stackblitz.svg "StackBlitz Demo"
104

115
# chakra-react-select v6
126

@@ -304,9 +298,7 @@ The prop `focusRingColor` can be passed with Chakra color tokens which will
304298
emulate style the control component when focused.
305299

306300
```tsx
307-
return (
308-
<Select focusRingColor="blue.600" />
309-
);
301+
return <Select focusRingColor="blue.600" />;
310302
```
311303

312304
![Orange errorBorderColor](./.github/images/custom-borders.png)
@@ -573,9 +565,11 @@ return (
573565
zIndex: "var(--chakra-z-index-dropdown)",
574566
}),
575567
}}
576-
chakraStyles={{
577-
// All other component styles
578-
}}
568+
chakraStyles={
569+
{
570+
// All other component styles
571+
}
572+
}
579573
/>
580574
);
581575
```
@@ -587,12 +581,7 @@ return (
587581
// example.js
588582
import "styles.css";
589583

590-
return (
591-
<Select
592-
menuPortalTarget={document.body}
593-
classNamePrefix="crs"
594-
/>
595-
);
584+
return <Select menuPortalTarget={document.body} classNamePrefix="crs" />;
596585
```
597586

598587
```css

0 commit comments

Comments
 (0)