@duro-app/eslint-config 1.1.1 → 1.1.2

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 CHANGED
@@ -28,7 +28,7 @@ export default [
28
28
  | Preset | Composes | For |
29
29
  | -------- | ------------------------------------------------------------------ | ------------------------- |
30
30
  | `base` | `@eslint/js` + `typescript-eslint` recommended, prettier interop | every TypeScript package |
31
- | `react` | base + react-hooks + `@duro-app/eslint-plugin` + UI-library policy | RSD / `@duro-app/ui` apps |
31
+ | `react` | base + classic react-hooks + `@duro-app/eslint-plugin` + UI policy | RSD / `@duro-app/ui` apps |
32
32
  | `effect` | base + `@effect` plugin + server-stack policy | Effect services |
33
33
  | `tests` | accessibility-first selectors (self-scoped to test/e2e files) | any repo with tests |
34
34
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duro-app/eslint-config",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Shareable ESLint flat config for the Duro stack: base TS conventions, the design-system rules and UI-library policy for React apps, Effect server conventions, and accessibility-first test selectors.",
@@ -49,7 +49,7 @@
49
49
  "eslint-config-prettier": "^10.1.8",
50
50
  "eslint-plugin-react-hooks": "^7.0.1",
51
51
  "typescript-eslint": "^8.56.0",
52
- "@duro-app/eslint-plugin": "^1.1.1"
52
+ "@duro-app/eslint-plugin": "^1.1.2"
53
53
  },
54
54
  "devDependencies": {
55
55
  "eslint": "^9.20.0",
package/src/index.js CHANGED
@@ -51,7 +51,19 @@ const LEXICAL_MESSAGE =
51
51
 
52
52
  export const react = tseslint.config(
53
53
  ...base,
54
- reactHooks.configs.flat.recommended,
54
+ // Classic hooks correctness only. react-hooks v7's flat.recommended also
55
+ // ships the React Compiler-era rules (refs, set-state-in-effect,
56
+ // immutability, …) at error — adopting those is a per-repo migration
57
+ // (duro-design-system deferred ~27 sites, website-builder ~53), not a
58
+ // default gate. A repo that adopts the compiler opts in on top.
59
+ {
60
+ name: 'duro-config/react-hooks-classic',
61
+ plugins: {'react-hooks': reactHooks},
62
+ rules: {
63
+ 'react-hooks/rules-of-hooks': 'error',
64
+ 'react-hooks/exhaustive-deps': 'warn',
65
+ },
66
+ },
55
67
  duro.configs.recommended,
56
68
  {
57
69
  name: 'duro-config/react-policy',