chore(v2): align ESLint and Prettier with sdk-web - #1329
Conversation
Standardize core SDK linting and formatting for v2 while preserving ES5 output and keeping kit tooling isolated. Mirrors the approach from #1322 onto master.
PR SummaryLow Risk Overview Developer workflow moves from the old pre-commit package to Husky + lint-staged (Prettier write + ESLint fix on staged CI and quality gates: BrowserStack workflows get a 30-minute job timeout; the main cross-browser workflow adds concurrency (one matrix per branch, cancel in-progress). Docs ( Reviewed by Cursor Bugbot for commit b5ade8e. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c8c2a38. Configure here.
generateHash returns a number, getFirstSeenTime returns a numeric timestamp, and PromotionActionType is numeric at runtime. The interfaces declared these as strings, which made SonarCloud flag existing test assertions as incompatible-type comparisons. Also drop the async keyword from a describe callback, which must be synchronous.
CI check triageSonarCloud — fixedThe Quality Gate failed on D Reliability Rating on New Code: 11 bugs, all in test files. They were pre-existing assertions that Prettier reflowed, which made Sonar re-classify them as "new code". Root cause was interfaces disagreeing with runtime values, so Sonar saw
Also removed These are type-only changes plus one cast in BrowserStack — pre-existing, not caused by this PRI ran
Every one of master's 48 failures is also present here. The single difference is Worth noting the two One PR run also failed purely on BrowserStack Check PR for semantic target branch — pre-existing repo config
Verified locally
|
Bring over the lasting #1321 CBT fixes for master: shared karma settings, drop EdgeHTML 15, concurrency across push/PR, tunnel localIdentifier, longer wait timeouts, and deflaked identify / multi-instance specs. Also stop re-registering @typescript-eslint in the flat config so ESLint cannot hit a plugin redefinition error.
Code review follow-upPorted the lasting BrowserStack stability work from #1321 onto this v2/ From #1321 (net tip state)EdgeHTML-only workarounds were intentionally skipped — #1321’s final tip reverts them after dropping Edge 15 from the matrix. What landed:
Bugbot: ESLint plugin registered twiceRemoved the duplicate |
|




Summary
src,test/src, andtest/jestkits/**on their own tooling, and classify Sonar sources/tests separatelyThis is the v2/
mastercounterpart of #1322 (which targetsmainfor v3).Test plan
npm run lintnpm run prettiernpm run build:iifenpm run test:jestChecklist