Conversation
Summary of ChangesHello @fansenze, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a crucial new linting rule to prevent silent numerical precision loss in JavaScript code. By flagging literal numbers that cannot be accurately represented by JavaScript's standard Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully ports the no-loss-of-precision ESLint rule to rslint, enhancing the linter's ability to detect potential precision issues in numeric literals. The implementation appears thorough, covering various number formats including binary, octal, hexadecimal, and scientific notation. A critical bug in cmd/rslint/api.go related to rule option matching has also been addressed, ensuring that rule configurations are correctly applied. The addition of comprehensive test cases further validates the rule's functionality.
52f2866 to
ff6dc85
Compare
80f9ca5 to
ac125fc
Compare
ac125fc to
76cd5e8
Compare
Summary
Port the ESLint
no-loss-of-precisionrule to rslint.This rule disallows literal numbers that lose precision when converted to JavaScript Number (IEEE 754 64-bit floating-point). Supports base-10 integers/decimals, scientific notation, binary (0b), octal (0o), hexadecimal (0x), and ES2021 numeric separators.
Also adds the core ESLint rule JS test infrastructure under
packages/rslint-test-tools/tests/eslint/.Related Links
Checklist