-
-
Notifications
You must be signed in to change notification settings - Fork 719
chore(apps/oxlint): tsdown enable arethetypeswrong #14177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(apps/oxlint): tsdown enable arethetypeswrong #14177
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enables arethetypeswrong (attw) checking in the tsdown configuration for the oxlint app. The change adds type checking capabilities to ensure proper TypeScript type exports.
- Adds @arethetypeswrong/core dependency for type checking validation
- Enables attw checking in tsdown configuration
- Reorganizes oxlint-tsgolint dependency order in package.json
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Adds @arethetypeswrong/core dependency and reorganizes existing dependencies |
| apps/oxlint/tsdown.config.ts | Enables attw type checking by setting attw: true |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
f467041 to
f1047e9
Compare
`oxlint` package export TS types. `defineRule` and `definePlugin` now give you type-safety and intellisense. Writing plugins in TS is only supported on versions of NodeJS which support type-stripping. Have not added a library (e.g. Jiti) to support older NodeJS versions. Probably some of the types are wrong. But I think this is a decent start. "Are the types wrong" (added in #14177) is reporting an error in `index.d.ts`: ```ts import { VisitorObject as Visitor } from "../dist/generated/visit/visitor.js"; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` because the file in `dist/generated/visit` is actually called `visitor.d.ts` (`.d.ts`, not `.js`). I'm not sure if that's a mistake in Rolldown's bundling, "Are the types wrong" being too strict, or a genuine problem. But regardless, TS seems to pick up the types from `visitor.d.ts`, so I think we can probably merge this and look into / fix it later.
`oxlint` package export TS types. `defineRule` and `definePlugin` now give you type-safety and intellisense. Writing plugins in TS is only supported on versions of NodeJS which support type-stripping. Have not added a library (e.g. Jiti) to support older NodeJS versions. Probably some of the types are wrong. But I think this is a decent start. "Are the types wrong" (added in oxc-project#14177) is reporting an error in `index.d.ts`: ```ts import { VisitorObject as Visitor } from "../dist/generated/visit/visitor.js"; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` because the file in `dist/generated/visit` is actually called `visitor.d.ts` (`.d.ts`, not `.js`). I'm not sure if that's a mistake in Rolldown's bundling, "Are the types wrong" being too strict, or a genuine problem. But regardless, TS seems to pick up the types from `visitor.d.ts`, so I think we can probably merge this and look into / fix it later.
`oxlint` package export TS types. `defineRule` and `definePlugin` now give you type-safety and intellisense. Writing plugins in TS is only supported on versions of NodeJS which support type-stripping. Have not added a library (e.g. Jiti) to support older NodeJS versions. Probably some of the types are wrong. But I think this is a decent start. "Are the types wrong" (added in oxc-project#14177) is reporting an error in `index.d.ts`: ```ts import { VisitorObject as Visitor } from "../dist/generated/visit/visitor.js"; // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` because the file in `dist/generated/visit` is actually called `visitor.d.ts` (`.d.ts`, not `.js`). I'm not sure if that's a mistake in Rolldown's bundling, "Are the types wrong" being too strict, or a genuine problem. But regardless, TS seems to pick up the types from `visitor.d.ts`, so I think we can probably merge this and look into / fix it later.

No description provided.