From e0fea8d6eee682eef843df519beef9b55d20fe0e Mon Sep 17 00:00:00 2001 From: Julian Descottes Date: Wed, 15 Jul 2020 14:59:19 +0000 Subject: [PATCH] Bug 1652690 - Remove outdated eslint rule for devtools/shared/platform r=nchevobbe,perftest-reviewers,sparky Small cleanup of eslint rules. Differential Revision: https://phabricator.services.mozilla.com/D83477 --- devtools/.eslintrc.js | 7 ------- devtools/client/inspector/.eslintrc.js | 10 +++++----- devtools/client/netmonitor/.eslintrc.js | 10 +++++----- devtools/client/shared/sourceeditor/.eslintrc.js | 8 ++++---- .../tests/devtools/addon/content/tests/.eslintrc.js | 7 ------- 5 files changed, 14 insertions(+), 28 deletions(-) diff --git a/devtools/.eslintrc.js b/devtools/.eslintrc.js index 603075cd41ab..ae08814a41f4 100644 --- a/devtools/.eslintrc.js +++ b/devtools/.eslintrc.js @@ -147,13 +147,6 @@ module.exports = { "mozilla/no-aArgs": "error", // See bug 1224289. "mozilla/reject-importGlobalProperties": ["error", "everything"], - // devtools/shared/platform is special; see the README.md in that - // directory for details. We reject requires using explicit - // subdirectories of this directory. - "mozilla/reject-some-requires": [ - "error", - "^devtools/shared/platform/(chome|content)/", - ], "mozilla/var-only-at-top-level": "error", "mozilla/use-chromeutils-import": ["error", { allowCu: true }], diff --git a/devtools/client/inspector/.eslintrc.js b/devtools/client/inspector/.eslintrc.js index c1782e594cd8..770fc8337eb6 100644 --- a/devtools/client/inspector/.eslintrc.js +++ b/devtools/client/inspector/.eslintrc.js @@ -9,13 +9,13 @@ module.exports = { extends: "../../.eslintrc.js", rules: { - // The inspector is being migrated to HTML and cleaned of - // chrome-privileged code, so this rule disallows requiring chrome - // code. Some files in the inspector disable this rule still. The - // goal is to enable the rule globally on all files. + // This rule was introduced for the DevTools HTML initiative, the goal was + // to avoid requiring helpers unavailable in a regular content page, to + // use DevTools as a regular webapplication. Should be reviewed in + // Bug 1591091. "mozilla/reject-some-requires": [ "error", - "^(chrome|chrome:.*|resource:.*|devtools/server/.*|.*\\.jsm|devtools/shared/platform/(chome|content)/.*)$", + "^(chrome|chrome:.*|resource:.*|devtools/server/.*|.*\\.jsm)$", ], }, }; diff --git a/devtools/client/netmonitor/.eslintrc.js b/devtools/client/netmonitor/.eslintrc.js index dbf432b2b90a..1af24d8319d7 100644 --- a/devtools/client/netmonitor/.eslintrc.js +++ b/devtools/client/netmonitor/.eslintrc.js @@ -6,13 +6,13 @@ module.exports = { rules: { - // The netmonitor is being migrated to HTML and cleaned of - // chrome-privileged code, so this rule disallows requiring chrome - // code. Some files in the netmonitor disable this rule still. The - // goal is to enable the rule globally on all files. + // This rule was introduced for the DevTools HTML initiative, the goal was + // to avoid requiring helpers unavailable in a regular content page, to + // use DevTools as a regular webapplication. Should be reviewed in + // Bug 1591091. "mozilla/reject-some-requires": [ "error", - "^(chrome|chrome:.*|resource:.*|devtools/server/.*|.*\\.jsm|devtools/shared/platform/(chome|content)/.*)$", + "^(chrome|chrome:.*|resource:.*|devtools/server/.*|.*\\.jsm)$", ], }, }; diff --git a/devtools/client/shared/sourceeditor/.eslintrc.js b/devtools/client/shared/sourceeditor/.eslintrc.js index 0b078ccf4010..9488479630e6 100644 --- a/devtools/client/shared/sourceeditor/.eslintrc.js +++ b/devtools/client/shared/sourceeditor/.eslintrc.js @@ -9,10 +9,10 @@ module.exports = { extends: "../../../.eslintrc.js", rules: { - // The inspector is being migrated to HTML and cleaned of - // chrome-privileged code, so this rule disallows requiring chrome - // code. Some files here disable this rule still. The - // goal is to enable the rule globally on all files. + // This rule was introduced for the DevTools HTML initiative, the goal was + // to avoid requiring helpers unavailable in a regular content page, to + // use DevTools as a regular webapplication. Should be reviewed in + // Bug 1591091. "mozilla/reject-some-requires": [ "error", "^(chrome|chrome:.*|resource:.*|devtools/server/.*|.*\\.jsm)$", diff --git a/testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js b/testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js index d2c433ceef81..c077272a02c6 100644 --- a/testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js +++ b/testing/talos/talos/tests/devtools/addon/content/tests/.eslintrc.js @@ -19,13 +19,6 @@ module.exports = { "mozilla/no-aArgs": "error", // See bug 1224289. "mozilla/reject-importGlobalProperties": ["error", "everything"], - // devtools/shared/platform is special; see the README.md in that - // directory for details. We reject requires using explicit - // subdirectories of this directory. - "mozilla/reject-some-requires": [ - "error", - "^devtools/shared/platform/(chome|content)/", - ], "mozilla/var-only-at-top-level": "error", "mozilla/use-chromeutils-import": ["error", { allowCu: true }], },