Conversation
|
@copilot try doing what a PR for the mentioned issue would otherwise do |
Done in commit 42417c3. The changes include:
All packages that run |
|
@copilot the base branch has changed so you may need to update |
Updated in 64783af. The base branch renamed
There will be a minor conflict in |
|
Some tests may fail due to the changes in the |
I'm running CI against ths branch to verify. |
|
@copilot the Validate PR action is failing because you do not have a change file, please run |
Co-authored-by: radium-v <863023+radium-v@users.noreply.github.com>
…gnizer.pw.spec.ts with lint fixes Co-authored-by: radium-v <863023+radium-v@users.noreply.github.com>
…es for CI Co-authored-by: janechu <7559015+janechu@users.noreply.github.com>
8e3af0a to
67f14b7
Compare
b76ba89 to
140f201
Compare
Pull Request
📖 Description
Enables Prettier formatting and ESLint linting for spec files across all packages (
fast-element,fast-ssr,fast-html,fast-router). Previously, spec files were excluded from formatting and linting to avoidhtmltag template formatting issues. This PR removes those exclusions and fixes all resulting lint and formatting violations.Also updates for base branch changes: the
fast-routerpackage converted its Karma-based tests to Playwright (renamingrecognizer.spec.ts→recognizer.pw.spec.ts), sorecognizer.spec.tshas been restored to its original state (to allow the rename to apply cleanly) andrecognizer.pw.spec.tshas been added with the required linting fixes.htmltagged template literals that are used in string-output assertions (SSR rendering checks,template.htmlcomparisons, andinnerHTMLchecks) have been protected with// prettier-ignoreto preserve their compact single-line format and prevent test failures.🎫 Issues
👩💻 Reviewer Notes
Changes are spread across ignore files and spec files in multiple packages. Key areas to review:
.prettierignore/.eslintignorefiles — spec file exclusions have been removedpackages/fast-ssr/.eslintrc.cjs— addedoverridesfor spec files to disablemax-len(HTML assertion strings are inherently long) and allow empty functions in template literalspackages/fast-element/src/di/di.integration.pw.spec.ts— file-leveleslint-disableadded for@typescript-eslint/naming-conventionand@typescript-eslint/no-empty-interfacesince the DI tests intentionally use theIXxxinterface-and-token patternpackages/fast-element/src/templating/binding.pw.spec.ts— removed a constant conditionif (":classList")that always evaluated totruepackages/fast-router/src/recognizer.pw.spec.ts— new file based on the Playwright version from the base branch, withimport/orderandmax-lenfixes appliedpackages/fast-router/src/recognizer.spec.ts— restored to original state so the base branch's rename can apply cleanly; there will be a minor conflict inrecognizer.pw.spec.ts(both branches added the file) — accept this PR's version to keep the linting fixespackages/fast-ssr/src/exports.spec.ts— twohtmltemplates used in SSR string-output assertions reverted to single-line with// prettier-ignoreto prevent rendered-output mismatchespackages/fast-element/src/templating/template.pw.spec.ts— all scenarios-arrayhtmltemplates restored to original compact format with// prettier-ignore; these templates are compared against expected HTML strings viatemplate.htmland whitespace differences would cause failurespackages/fast-element/src/components/element-controller.pw.spec.ts—html\Test 2`template kept single-line with// prettier-ignoresince the test assertsinnerHTML === "Test 2"` exactlynone) added for@microsoft/fast-html,@microsoft/fast-router, and@microsoft/fast-ssrPre-existing ESLint errors in non-spec
fast-ssrsource files are unrelated to this PR.📑 Test Plan
eslint . --ext .tsfrom within each package directory — all packages that includeeslintin theirtestscript now pass with 0 errorshtmltagged template literals used in string-output assertions are protected with// prettier-ignoreto avoid whitespace-induced test failures✅ Checklist
General
$ npm run change⏭ Next Steps
fast-ssrsource files (unrelated to this PR)✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.