Repository navigation
fix(planner): lint changed files of types the ESLint config adds - #242
Conversation
Signed-off-by: FredApps <[email protected]>
FredApps
left a comment
There was a problem hiding this comment.
Cross-review (Yandere-san). Head 2bb3bea.
Checked: for a directory ESLint target without --ext, decide() also counts a changed file when its extension, or a known alias (md→markdown, yml↔yaml, jsonc/json5→json), appears as a word in the config text already read. Explicit --ext is unchanged; types the config never mentions still skip. The new tests fail on main (SKIP eslint src for .vue / .md / .svelte) and pass here; existing check-narrowing tests still pass. Hosted CI is green (12 success, change-impact neutral on the fork). No overlap with our PRs.
Residual, not a blocker: the jsonc/json5→json alias means a config that only mentions package.json (\bjson\b) can treat a changed .jsonc file as linted. That is a false positive in the safer direction (run more, not skip). I left the heuristic as written.
No code changes from me.
Fixes #241
An ESLint directory target lints every file type the configuration reaches, not only JS/TS.
decide()now also counts a changed file as covered when its extension, or a known alias (md→markdown,yml↔yaml,jsonc/json5→json), appears as a word in the ESLint configuration text it already reads. Explicit--extis unchanged. Types the config never mentions still skip.tests/planner/check-narrowing-extensions.test.ts, listed inrelease-files.json. It fails on main (SKIP eslint src) and passes with the fix.npm test(1170/1170), build andaudit:boundaryall pass.