Closed Bug 1897770 Opened 2 months ago Closed 2 months ago

Improve sjs environment definitions in ESLint

Categories

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

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(2 files)

In noticed in a review today that there was a case where the ESLint rule mozilla/no-redeclare-with-import-autofix was being disabled on a line basis with .sjs files for things like setTimeout imports.

I realised that sjs files are generally getting the same environment as tests, which is why they complain that setTimeout is a duplicate. We have a specific environment for sjs files, so we should only be using that.

Additionally, I also noticed that we can share the current @microsoft/sdl/no-insecure-url set-up across tests with the new general-test config and exclude it for xpcshell-tests. This means that we can put the general-test definition first, and have the other tests add to it.

This moves the general test definition to be first, so that the other test types can build on it.
It also re-arranges the no-insecure-url rule definitions to be defined in a single place in general-test.

This also exposes a few more places where we're not currently meeting the no-insecure-url rule, so we allowlist
those as well for now.

This stops sjs files from picking up the test environments/configurations which means they get just the sjs environment
which is what we want.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/66cd1e7d29af
Move ESLint no-insecure-url definitions to general-test.js. r=frontend-codestyle-reviewers,Gijs
https://hg.mozilla.org/integration/autoland/rev/ac2316c2428a
Improve .sjs file environment definitions in ESLint. r=frontend-codestyle-reviewers,extension-reviewers,Gijs
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
See Also: → 1897884
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: