4

Enable ESLint rule no-loss-of-precision

 3 years ago
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1730126
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
Closed Bug 1730126 Opened 2 months ago Closed 24 days ago

Enable ESLint rule no-loss-of-precision

Categories

(Firefox Build System :: Lint and Formatting, task, P3)

Firefox Build System ▾
Lint and Formatting ▾

Tracking

(firefox95 fixed)

RESOLVED FIXED

95 Branch

Tracking Status firefox95 --- fixed

People

(Reporter: standard8, Assigned: riasangwan1999, Mentored)

References

(Blocks 1 open bug)

Details

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

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]
default.jpg

Assignee

Comment 2

1 month ago

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.

default.jpg

Assignee

Comment 4

1 month ago

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
default.jpg

Assignee

Comment 6

27 days ago

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
Status: ASSIGNED → RESOLVED
Closed: 24 days ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
default.jpg

Assignee

Comment 9

22 days ago

Can I work on this new issue?

You need to log in before you can comment on or make changes to this bug.

Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK