Closed Bug 2063194 Opened 23 days ago Closed 22 days ago

Force eslint on enterprisepolicies Policies.sys.mjs' file

Categories

(Enterprise Products :: Thunderbird, task)

Tracking

(firefox156 fixed)

RESOLVED FIXED
156 Branch
Tracking Status
firefox156 --- fixed

People

(Reporter: gerard-majax, Assigned: gerard-majax)

References

Details

Attachments

(1 file)

In order to be able to properly keep in sync thunderbird and firefox' enterprise policies where it is relevant, as attempted in bug 2062510, this relies on enforcing the eslint rule prefer-const on this specific file: both repositories have different default values here, and thunderbird is stricter.

This results in linting issues on Thunderbird side, and extra useless changes to keep policies in sync, changes only limited to replacing const by let.

Proposal is locally forcing prefer-const on the file on gecko, so that the test added in bug 2062510 is more relevant.

Pushed by rperta@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/6fa02c73f2ba https://hg.mozilla.org/integration/autoland/rev/f31f223a8c95 Revert "Bug 2063194 - Force eslint prefer-const on Policies.sys.mjs r=mkaply,jneuberger" for causing lint failrues

Backed out for causing lint failrues
Backout link
Push with failures
Failure log(s)

Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(lissyx+mozillians)

Of course something on autoland had already regressed this

Status: NEW → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 156 Branch

(In reply to :gerard-majax from comment #0)

In order to be able to properly keep in sync thunderbird and firefox' enterprise policies where it is relevant, as attempted in bug 2062510, this relies on enforcing the eslint rule prefer-const on this specific file: both repositories have different default values here, and thunderbird is stricter.

Please note that Firefox has not enabled prefer-const globally for various reasons - see the discussion in bug 1803560. We also try and keep a consistent configuration across the code base, so that it is easier for developers. In this case, one file probably doesn't matter too much, however if this is desired for more files, please discuss with the JS usage & style team first.

(In reply to Mark Banner (:standard8) from comment #8)

(In reply to :gerard-majax from comment #0)

In order to be able to properly keep in sync thunderbird and firefox' enterprise policies where it is relevant, as attempted in bug 2062510, this relies on enforcing the eslint rule prefer-const on this specific file: both repositories have different default values here, and thunderbird is stricter.

Please note that Firefox has not enabled prefer-const globally for various reasons - see the discussion in bug 1803560. We also try and keep a consistent configuration across the code base, so that it is easier for developers. In this case, one file probably doesn't matter too much, however if this is desired for more files, please discuss with the JS usage & style team first.

The goal in the next couple of weeks is to be able to completely deduplicate the policies code between firefox and thunderbird, so that enforced prefer-const will not be a problem anymore because the code will be shared at toolkit/ level. Unfortunately, for the time being we have to live with the duplicated code, and making sure it's strictly identical is really important

Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: