зеркало из 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.
|
||||
files: [
|
||||
"server/**",
|
||||
// The rule also applies to all `shared` files, with the exception of
|
||||
// shared/fronts.
|
||||
// This first pattern matches files in a shared subfolder other than "fronts".
|
||||
"shared/!(fronts)/**",
|
||||
// This second pattern matches files directly under shared.
|
||||
"shared/*.**",
|
||||
],
|
||||
// For all server and shared files, prevent requiring devtools/client
|
||||
// modules.
|
||||
files: ["server/**", "shared/**"],
|
||||
// devtools-client.js is effectively a client file, but it is still loaded
|
||||
// by test suites in devtools/shared and devtools/server.
|
||||
excludedFiles: ["shared/client/devtools-client.js"],
|
||||
rules: {
|
||||
"mozilla/reject-some-requires": [
|
||||
"error",
|
||||
|
|
Загрузка…
Ссылка в новой задаче