@duro-app/eslint-config 2.0.1 → 3.0.0

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.
Files changed (2) hide show
  1. package/README.md +28 -0
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -54,6 +54,34 @@ Severity is the one gating line: `error` gates at commit and CI, `warn`
54
54
  informs everywhere. Don't add `--max-warnings=0` — promote a rule to
55
55
  `error` here instead if it earns gating.
56
56
 
57
+ ### Adopting 3.0 with existing debt
58
+
59
+ 3.0 promotes `duro/no-raw-design-values` to `error` and adds
60
+ `duro/no-raw-breakpoint-query`. A repo that already carries raw values keeps
61
+ the gate for every **new** file and ratchets the old ones down with an
62
+ explicit file list — never a glob, never `--max-warnings`:
63
+
64
+ ```js
65
+ // eslint.duro-baseline.js — delete a line when its file is migrated. Never add one.
66
+ export const RAW_VALUES_BASELINE = [
67
+ 'app/routes/legacy-dashboard.tsx',
68
+ 'app/components/OldChart/OldChart.tsx',
69
+ ]
70
+ ```
71
+
72
+ ```js
73
+ // eslint.config.js — after the presets, so last-wins downgrades only these
74
+ import {RAW_VALUES_BASELINE} from './eslint.duro-baseline.js'
75
+ export default [
76
+ ...react,
77
+ {files: RAW_VALUES_BASELINE, rules: {'duro/no-raw-design-values': 'warn'}},
78
+ ]
79
+ ```
80
+
81
+ Most findings carry a suggestion; the ESLint API can apply them in bulk
82
+ (`message.suggestions[0].fix`). What is left is the handful that need a
83
+ human choice — an off-palette color, an off-scale spacing.
84
+
57
85
  ## Escape hatches
58
86
 
59
87
  Flat config is last-wins — scope an override after the preset:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duro-app/eslint-config",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
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": "^2.0.1"
52
+ "@duro-app/eslint-plugin": "^3.0.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "eslint": "^9.20.0",