eslint-plugin-react-doctor 0.9.12-dev.a2b460d → 0.9.12-dev.f7efb7d
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 +18 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -44,6 +44,24 @@ export default [
|
|
|
44
44
|
|
|
45
45
|
Pick only the configs that match your stack. `recommended` is framework-agnostic; the others layer on framework-specific rules.
|
|
46
46
|
|
|
47
|
+
If React Compiler is enabled, declare that capability once so React Doctor can disable compiler-redundant manual-memoization rules:
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
export default [
|
|
51
|
+
reactDoctor.configs.recommended,
|
|
52
|
+
reactDoctor.configs["react-native"],
|
|
53
|
+
{
|
|
54
|
+
settings: {
|
|
55
|
+
"react-doctor": {
|
|
56
|
+
capabilities: ["react-compiler"],
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
React Doctor's CLI discovers this automatically. ESLint flat configs are static, so standalone ESLint users declare the capability explicitly.
|
|
64
|
+
|
|
47
65
|
## Available configs
|
|
48
66
|
|
|
49
67
|
| Config | What it adds |
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,11 @@ interface EslintFlatConfig {
|
|
|
27
27
|
name: string;
|
|
28
28
|
plugins: Record<string, EslintPlugin>;
|
|
29
29
|
rules: Record<string, OxlintRuleSeverity>;
|
|
30
|
+
settings: {
|
|
31
|
+
"react-doctor": {
|
|
32
|
+
portedRuleMode: "curated";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
30
35
|
}
|
|
31
36
|
interface EslintPlugin {
|
|
32
37
|
meta: {
|
package/dist/index.js
CHANGED
|
@@ -19,12 +19,13 @@ const eslintShapedRules = Object.fromEntries(Object.entries(oxlintPlugin.rules).
|
|
|
19
19
|
const buildFlatConfig = (configName, ruleSet) => ({
|
|
20
20
|
name: `react-doctor/${configName}`,
|
|
21
21
|
plugins: {},
|
|
22
|
-
rules: { ...ruleSet }
|
|
22
|
+
rules: { ...ruleSet },
|
|
23
|
+
settings: { "react-doctor": { portedRuleMode: "curated" } }
|
|
23
24
|
});
|
|
24
25
|
const eslintPlugin = {
|
|
25
26
|
meta: {
|
|
26
27
|
name: PLUGIN_NAMESPACE,
|
|
27
|
-
version: "0.9.12-dev.
|
|
28
|
+
version: "0.9.12-dev.f7efb7d"
|
|
28
29
|
},
|
|
29
30
|
rules: eslintShapedRules,
|
|
30
31
|
configs: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-doctor",
|
|
3
|
-
"version": "0.9.12-dev.
|
|
3
|
+
"version": "0.9.12-dev.f7efb7d",
|
|
4
4
|
"description": "React Doctor rules for ESLint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"oxlint-plugin-react-doctor": "0.9.12-dev.
|
|
45
|
+
"oxlint-plugin-react-doctor": "0.9.12-dev.f7efb7d"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^25.6.0"
|