-
-
Notifications
You must be signed in to change notification settings - Fork 48
feat: Lint plugin POC #2097
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
base: main
Are you sure you want to change the base?
feat: Lint plugin POC #2097
Conversation
|
pkg.pr.new packages benchmark commit |
📊 Bundle Size Comparison
👀 Notable resultsStatic test results:No major changes. Dynamic test results:No major changes. 📋 All resultsClick to reveal the results table (330 entries).
If you wish to run a comparison for other, slower bundlers, run the 'Tree-shake test' from the GitHub Actions menu. |
| return; | ||
| } | ||
|
|
||
| if (isIntCast(node.left) && isIntCast(node.right)) { |
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.
I think something like 12 / d.u32(5) would be a common pattern (wrapping just the denominator and expecting integer division). I know coding agents tend to do that.
This is an eslint plugin, thus it should be compatible with oxc.
The plugin currently has one rule, which detects int/int divisions.
I did not do any package publishing stuff yet.
To test the CLI locally in the typegpu package:
nr buildin the lint plugin package,pnpm install -D eslint,pnpm install -D @typescript-eslint/parserin typegpu package,"eslint-plugin-typegpu": "workspace:*"dependency to typegpu dev dependencies in package.json,eslint.config.jsfileni; npx eslintin typegpu package.The plugin tests use vitest's
describeanditunder the hood, and are compatible with hot reload. Tests are wrapped into adescribeto let vitest's static analysis know that this is in fact a test file.