Skip to content

Commit 25b5d2b

Browse files
committed
lint(cutover): the root ESLint config leaves ui/** to ui/eslint.config.js (decision G1, objectstack#25803)
Decision G1 of #25752: the root flat config's global ignore gains ui/**, with the census of what it stops, so the merged tree is linted once per file — ui/ by its own config in Lint UI, the rest by this one. Bill item 25. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CUXv64KLMfYv3ia2sWi6te
1 parent 1c0d02e commit 25b5d2b

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

‎eslint.config.mjs‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,30 @@ const NEVER_LINTED = Object.freeze([
912912
'**/.turbo/**',
913913
]);
914914

915+
// ───────────────────────────────────────────────────────────────────────────
916+
// Source trees linted by THEIR OWN flat config, not by this one. Global-only:
917+
// unlike NEVER_LINTED this is authored source, so it is not spread into the
918+
// per-object `ignores` below — the one global object removes it from this
919+
// config's population, and nothing here may ever start matching it by accident
920+
// of a `files` glob.
921+
//
922+
// `ui/**` is the objectui tree imported at the cutover (decision G1 on #25752,
923+
// verbatim 「17e · 17f · 17g · 同意」): `ui/eslint.config.js` lints it, the
924+
// `Lint UI` CI job runs that config, and the two configs converge in the
925+
// aftercare card #25753. Census of what this one line stops, measured over the
926+
// merged tree on the verify branch (9e37acd126, `pnpm lint` exactly as
927+
// package.json spells it): 121 errors and 16,511 warnings, every one of them
928+
// under `ui/**` (dominant rule `react-hooks/static-components`, then
929+
// `react-hooks/purity`, `no-restricted-imports`,
930+
// `@typescript-eslint/no-empty-object-type`, `no-console`). Outside `ui/` the
931+
// population this config lints is byte-for-byte the pre-import one, so its
932+
// verdict there does not move. Delete the entry in the PR that adopts this
933+
// config across `ui/` — never by widening a per-object `ignores` instead.
934+
// ───────────────────────────────────────────────────────────────────────────
935+
const LINTED_BY_OWN_CONFIG = Object.freeze([
936+
'ui/**',
937+
]);
938+
915939
export default [
916940
// ───────────────────────────────────────────────────────────────────────────
917941
// GLOBAL ignore. This is the ONLY object in this array with no `files` key,
@@ -965,7 +989,7 @@ export default [
965989
// either of them becoming the next `.next`. See #12334 / #12304.
966990
// ───────────────────────────────────────────────────────────────────────────
967991
{
968-
ignores: [...NEVER_LINTED],
992+
ignores: [...NEVER_LINTED, ...LINTED_BY_OWN_CONFIG],
969993
},
970994
{
971995
files: ['**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}'],

0 commit comments

Comments
 (0)