Skip to content

Commit d4f4f36

Browse files
os-zhuangclaude
andauthored
fix(dx): per-package lint scripts stop existing where they can only mislead (#4276) (#4304)
* fix(dx): per-package lint scripts stop existing where they can only mislead (#4276) `pnpm --filter @objectstack/verify lint` (package-local `eslint src`) failed on a clean HEAD with 7x "Definition for rule '@typescript-eslint/no-explicit-any' was not found": the standalone run resolves the root flat config, which registers only the TS parser — never the @typescript-eslint plugin — and, unlike the root gate (`eslint . --no-inline-config`), honors the orphaned eslint-disable directives in src, so each one references a rule that does not exist. cli and lint carried the same script and passed only because their src has no such directives yet — same divergence, one comment away from the same red. No turbo lint task or CI job ever ran these scripts; most packages never had one. Remove all three and lint only from the root, matching the gate exactly. The root config now documents the decision and the scoped-run recipe (`pnpm exec eslint --no-inline-config <dir>`). Closes #4276 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195He4CTy2BvCVMDTJ6NkVY * chore: empty changeset — dev-script removal releases nothing Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195He4CTy2BvCVMDTJ6NkVY --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent a62bd9e commit d4f4f36

5 files changed

Lines changed: 12 additions & 4 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
---
3+
4+
fix(dx): remove the per-package `lint` scripts (`eslint src`) from `@objectstack/verify`, `@objectstack/cli` and `@objectstack/lint` (#4276). A standalone run resolves the root flat config but honors the inline directives the root gate's `--no-inline-config` exists to ignore, so it fails on rules the config never registers — verify was red on a clean HEAD. Lint only from the root; the scoped recipe is documented in `eslint.config.mjs`. Dev scripts only; releases nothing.

eslint.config.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ import tsParser from '@typescript-eslint/parser';
1818
// import guard), and the flag ignores them so the guard runs clean. The only
1919
// active rule (no-restricted-imports) should never need a local opt-out — it
2020
// prevents a ~1.2GB RSS regression.
21+
//
22+
// Lint ONLY from the root. Per-package `lint` scripts (`eslint src`) were
23+
// removed in #4276: a standalone run resolves this same config but honors the
24+
// inline directives `--no-inline-config` exists to ignore, so it fails on
25+
// rules this config never registers ("Definition for rule … was not found").
26+
// Don't add such a script back — scope a local run from the root instead:
27+
// `pnpm exec eslint --no-inline-config packages/verify/src`.
2128

2229
const SUBPATH_NAMES = [
2330
'Data', 'UI', 'System', 'AI', 'API', 'Automation',

packages/cli/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"scripts": {
1212
"build": "if [ -n \"$OS_SKIP_DTS\" ]; then tsc -p tsconfig.build.json --noCheck --declaration false --declarationMap false; else tsc -p tsconfig.build.json; fi",
1313
"dev": "tsc -p tsconfig.build.json --watch",
14-
"test": "vitest run",
15-
"lint": "eslint src"
14+
"test": "vitest run"
1615
},
1716
"keywords": [
1817
"objectstack",

packages/lint/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"scripts": {
1717
"build": "tsup --config ../../tsup.config.ts",
1818
"dev": "tsc -w",
19-
"lint": "eslint src",
2019
"test": "vitest run"
2120
},
2221
"dependencies": {

packages/verify/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"scripts": {
1717
"build": "tsup --config ../../tsup.config.ts",
1818
"dev": "tsc -w",
19-
"lint": "eslint src",
2019
"test": "vitest run"
2120
},
2221
"dependencies": {

0 commit comments

Comments
 (0)