Improve sjs environment definitions in ESLint
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox128 fixed)
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.
Assignee | ||
Comment 1•2 months ago
|
||
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.
Assignee | ||
Comment 2•2 months ago
|
||
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
Comment 4•2 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/66cd1e7d29af
https://hg.mozilla.org/mozilla-central/rev/ac2316c2428a
Description
•