@howells/lint 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/oxlint/react-doctor-rules.d.mts +8 -0
- package/oxlint/react-doctor-rules.mjs +14 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -108,6 +108,7 @@ Choose the closest preset:
|
|
|
108
108
|
- `@howells/lint/oxlint/core` for Node or non-React TypeScript
|
|
109
109
|
- `@howells/lint/oxlint/react` for React (Ultracite React + React Doctor recommended rules)
|
|
110
110
|
- `@howells/lint/oxlint/next` for Next.js (react preset + Next.js rules)
|
|
111
|
+
- `@howells/lint/oxlint/react-doctor-rules` for composing or disabling React Doctor rules in mixed workspaces
|
|
111
112
|
|
|
112
113
|
Node or non-React TypeScript:
|
|
113
114
|
|
|
@@ -142,6 +143,24 @@ export default defineConfig({
|
|
|
142
143
|
});
|
|
143
144
|
```
|
|
144
145
|
|
|
146
|
+
Mixed monorepo with a Next.js app and Node-only packages:
|
|
147
|
+
|
|
148
|
+
```ts
|
|
149
|
+
import { defineConfig } from "oxlint";
|
|
150
|
+
import next from "@howells/lint/oxlint/next";
|
|
151
|
+
import { disabledReactDoctorRules } from "@howells/lint/oxlint/react-doctor-rules";
|
|
152
|
+
|
|
153
|
+
export default defineConfig({
|
|
154
|
+
extends: [next],
|
|
155
|
+
overrides: [
|
|
156
|
+
{
|
|
157
|
+
files: ["packages/**/*.ts"],
|
|
158
|
+
rules: disabledReactDoctorRules,
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
});
|
|
162
|
+
```
|
|
163
|
+
|
|
145
164
|
Create an `oxfmt.config.ts`:
|
|
146
165
|
|
|
147
166
|
```ts
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { OxlintConfig } from "oxlint";
|
|
2
|
+
|
|
3
|
+
type OxlintRules = NonNullable<OxlintConfig["rules"]>;
|
|
4
|
+
|
|
5
|
+
export const reactDoctorRecommendedRules: OxlintRules;
|
|
6
|
+
export const reactDoctorNextRules: OxlintRules;
|
|
7
|
+
export const reactDoctorRules: OxlintRules;
|
|
8
|
+
export const disabledReactDoctorRules: OxlintRules;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NEXTJS_RULES,
|
|
3
|
+
RECOMMENDED_RULES,
|
|
4
|
+
} from "oxlint-plugin-react-doctor";
|
|
5
|
+
|
|
6
|
+
export const reactDoctorRecommendedRules = RECOMMENDED_RULES;
|
|
7
|
+
export const reactDoctorNextRules = NEXTJS_RULES;
|
|
8
|
+
export const reactDoctorRules = {
|
|
9
|
+
...RECOMMENDED_RULES,
|
|
10
|
+
...NEXTJS_RULES,
|
|
11
|
+
};
|
|
12
|
+
export const disabledReactDoctorRules = Object.fromEntries(
|
|
13
|
+
Object.keys(reactDoctorRules).map((ruleName) => [ruleName, "allow"])
|
|
14
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howells/lint",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Pinned Biome, Oxlint/Oxfmt, Ultracite, and React Doctor presets for Howells projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"packageManager": "pnpm@10.23.0",
|
|
@@ -62,6 +62,10 @@
|
|
|
62
62
|
"./oxlint/next": {
|
|
63
63
|
"types": "./oxlint/next.d.mts",
|
|
64
64
|
"default": "./oxlint/next.mjs"
|
|
65
|
+
},
|
|
66
|
+
"./oxlint/react-doctor-rules": {
|
|
67
|
+
"types": "./oxlint/react-doctor-rules.d.mts",
|
|
68
|
+
"default": "./oxlint/react-doctor-rules.mjs"
|
|
65
69
|
}
|
|
66
70
|
},
|
|
67
71
|
"main": "index.js",
|