[
https://issues.apache.org/jira/browse/FLINK-39587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Purushottam Sinha updated FLINK-39587:
--------------------------------------
Description:
Description:
`npm run lint` uses `eslint --cache`, so files that previously passed
83 `prettier/prettier` errors across 25 HTML templates under
`flink-runtime-web/web-dashboard/src/` (verify: `rm .eslintcache &&
npm run lint`).
Fix:
- Drop `--cache` from the `lint` script in `package.json`.
- Run `npm run lint:fix` across `src/` as one commit.
- Register that SHA in `.git-blame-ignore-revs`.
Done when: `rm .eslintcache && npm run lint` exits 0 on a fresh clone.
was:
Problem
The dashboard configures Prettier strictly but does not enforce it in CI. Files
in master quietly violate .prettierrc; when a contributor edits one, the
pre-commit hook auto-reformats it, producing unrelated diff churn in feature
PRs (recent example: PR #27774 reformats job-manager-logs.component.ts and
task-manager-logs.component.ts).
Evidence
- package.json:7 — lint runs eslint --cache, so previously-passing files are
skipped even after .prettierrc changes.
- Azure dashboard step runs npm run build, not npm run ci-check — lint never
gates PRs.
- .prettierrc enforces singleQuote: true, bracketSpacing: true; master files
like *-logs.component.ts violated both until PR #27774 touched them.
Proposed fix
- One-time npm run lint:fix across flink-runtime-web/web-dashboard/src,
landed as a single dedicated commit.
- Add that SHA to .git-blame-ignore-revs.
- Wire npm run lint (no --cache in CI) into the dashboard's Azure step.
Acceptance
- Fresh clone: npm run lint passes without --cache.
- A style-violating commit fails the dashboard CI step.
> [Web dashboard] CI lint uses --cache and tolerates prettier drift on master
> ---------------------------------------------------------------------------
>
> Key: FLINK-39587
> URL: https://issues.apache.org/jira/browse/FLINK-39587
> Project: Flink
> Issue Type: Bug
> Components: Runtime / Web Frontend
> Reporter: Purushottam Sinha
> Priority: Minor
>
> Description:
>
>
>
> `npm run lint` uses `eslint --cache`, so files that previously passed
> 83 `prettier/prettier` errors across 25 HTML templates under
>
>
> `flink-runtime-web/web-dashboard/src/` (verify: `rm .eslintcache &&
>
>
> npm run lint`).
>
>
>
>
>
> Fix:
>
>
> - Drop `--cache` from the `lint` script in `package.json`.
>
>
> - Run `npm run lint:fix` across `src/` as one commit.
> - Register that SHA in `.git-blame-ignore-revs`.
>
>
>
> Done when: `rm .eslintcache && npm run lint` exits 0 on a fresh clone.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
