You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This brings in Strada's lint config and fixes or inline-ignores all violations. This has been on my backlog for a long time, but the immediate motivation is to follow up with some new custom rules that will prevent things like #65625 from happening.
This uses ESLint's experimental TS 7 backend, by linking @typescript/native to our own locally built API.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Cross-lint CI jobs fail because TypeScript linting builds a foreign-target compiler, and two ESLint rules incorrectly check destructured property names and flag uncalled method references.
Enables ESLint for the TypeScript JavaScript API package using the locally built compiler and the experimental TS 7 backend. This establishes lint infrastructure for future API consistency checks motivated by issues such as #65625.
Changes:
Adds ESLint configuration, custom rules, dependencies, and build-task integration.
Updates package sources, tests, and benchmarks to satisfy lint rules or document intentional exceptions.
Adds regression tests for property predicates, inherited options, and callback validation.
File
Description
packages/vscode-typescript/package.json
Aligns the local API dependency version.
packages/typescript/test/wasm.ts
Refines callback typing and parameter naming.
packages/typescript/test/testUtils.ts
Documents dictionary usage and removes redundant casts.
packages/typescript/test/sync/wasm.test.ts
Updates sorting, protocol checks, and lint exceptions.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The change leaves all-checks without required build prerequisites on clean checkouts and allows defaulted parameters to bypass the keyword-name restriction.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Add build prerequisites to all-checks
Herebyfile.mjs:1447
all-checks calls runLint() directly without the build dependencies declared by lint and validate. On a checkout without build outputs, ESLint now runs without the emitted API modules or native compiler required by the tsgo backend. Add the same host-conditional [local, buildAPI] prerequisites to allChecks.
Defaulted parameters are AssignmentPattern nodes, so function f(string = "") {} passes this rule while the same parameter without a default is reported. Please unwrap assignment patterns before checking the bound identifier so adding a default does not bypass the newly enabled keyword-name restriction.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This brings in Strada's lint config and fixes or inline-ignores all violations. This has been on my backlog for a long time, but the immediate motivation is to follow up with some new custom rules that will prevent things like #65625 from happening.
This uses ESLint's experimental TS 7 backend, by linking
@typescript/nativeto our own locally built API.