Closed Bug 1591091 Opened 5 years ago Closed 4 years ago

Review eslint rules preventing to use chrome/resource in some devtools/client folders

Categories

(DevTools :: Inspector, task, P3)

task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1700106

People

(Reporter: jdescottes, Unassigned)

References

Details

In Bug 1591013, I am adding stricter linting rules for our requires. The goal is to check that we are not requiring client files from the server, but to do so I am also extending the existing rule mozilla/reject-some-requires to check "lazyImporter" (it only checks require and lazyRequireGetter at the moment).

While updating that I faced a failure on the inspector on:
https://searchfox.org/mozilla-central/rev/088e2cf29c59d733d57af43903eb0267dbf72e2a/devtools/client/inspector/inspector.js#74

I am going to eslint disabled the rule on this line for now, but we should review this import. Either :

  • it's ok to do this import and we should remove the eslintrc file in the devtools/client/inspector
  • we still want to avoid dependencies on chrome code and we should find an alternative.

Repurposing this bug.

We have a few eslint files from the DevTools HTML era: https://searchfox.org/mozilla-central/search?q=%5E%28chrome%7Cchrome%3A.*%7Cresource%3A.*%7Cdevtools%2Fserver&path=&case=true&regexp=false

They prevent:

  • requiring chrome
  • loading chrome:// or resource:// files
  • requiring devtools/shared/platform/(chrome|content) (this is being removed in Bug 1652690, it's no longer relevant)

On one hand we could get rid of the rules, since the DevTools HTML project is no longer in progress. However, if we still intend to write UIs that can be ported outside of Firefox, then those rules might be good to keep (and to apply to the whole devtools/client ?)

To be discussed.

Summary: Check if lazyImport of gre/modules/DeferredTask.jsm in client/inspector.js is acceptable → Review eslint rules preventing to use chrome/resource in some devtools/client folders
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.