Closed Bug 1730126 Opened 3 years ago Closed 3 years ago

Enable ESLint rule no-loss-of-precision

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: standard8, Assigned: riasangwan1999, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=js])

Attachments

(1 file)

no-loss-of-precision is enabled by default in ESLint v8. I think we can enable this ahead of time.

The current failures are test-only, so there is no adverse effects on the product. However, it feels like we should be aware of possible issues when running tests, so enabling it would be good.

I'm happy to mentor this.

The rule no-loss-of-precision needs adding to recommended.js as an error.

Once the rule has been added you can run ./mach eslint to find all the instances it fails, and then fix those up. You can also run ./mach eslint path/to/file to run ESLint on a specific file or directory.

You can also install an editor integration to make it easier when editing files.

For instructions on how to get your local build of Firefox up and running and submit your patch, see https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html

Note this bug will be auto-assigned when the first patch is attached.

Mentor: standard8
Keywords: good-first-bug
Whiteboard: [lang=js]

Hi, Can I work on this issue?

Sure, as far I as know no-one else is working on it. Note it'll be assigned when the first patch is attached.

Thank you, I'll update you with my work.

Assignee: nobody → riasangwan1999
Attachment #9247391 - Attachment description: WIP: Bug 1730126 - added no-loss-precision-rule and fixed all tests that were failing. reviewer - Mark Banner → Bug 1730126 - added no-loss-precision-rule and fixed all tests that were failing. r?standard8
Status: NEW → ASSIGNED

What will be the further process with this issue? I am not sure what is the issue with the failing test case. Please guide me.
Thanks!

Attachment #9247391 - Attachment description: Bug 1730126 - added no-loss-precision-rule and fixed all tests that were failing. r?standard8 → Bug 1730126 - Enable ESLint rule no-loss-of-precision. r?standard8
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/edb22d241fe5
Enable ESLint rule no-loss-of-precision. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
See Also: → 1738583

Can I work on this new issue?

Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: