зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1604539 - Update eslint reject-some-requires "devtools/client" configuration r=nchevobbe
Depends on D67605 The eslint rule prevent devtools/client requires can now target all shared/** files We also exclude devtools-client specifically, since it imports the object-front despite being in devtools/shared. This file is always used from devtools/client at runtime but is used in many shared & server test suites Differential Revision: https://phabricator.services.mozilla.com/D67606 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
71bd7a36e4
Коммит
9d8fb569a8
|
@ -86,16 +86,12 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// For all server files, prevent requiring devtools/client modules.
|
// For all server and shared files, prevent requiring devtools/client
|
||||||
files: [
|
// modules.
|
||||||
"server/**",
|
files: ["server/**", "shared/**"],
|
||||||
// The rule also applies to all `shared` files, with the exception of
|
// devtools-client.js is effectively a client file, but it is still loaded
|
||||||
// shared/fronts.
|
// by test suites in devtools/shared and devtools/server.
|
||||||
// This first pattern matches files in a shared subfolder other than "fronts".
|
excludedFiles: ["shared/client/devtools-client.js"],
|
||||||
"shared/!(fronts)/**",
|
|
||||||
// This second pattern matches files directly under shared.
|
|
||||||
"shared/*.**",
|
|
||||||
],
|
|
||||||
rules: {
|
rules: {
|
||||||
"mozilla/reject-some-requires": [
|
"mozilla/reject-some-requires": [
|
||||||
"error",
|
"error",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче