Closed Bug 1842869 Opened 8 months ago Closed 8 months ago

Simplify and fix newtab's ESLint configuration

Categories

(Firefox :: New Tab Page, task, P1)

task

Tracking

()

RESOLVED FIXED
117 Branch
Iteration:
117.1 - July 3 - July 14
Tracking Status
firefox117 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The newtab ESLint configuration is still largely set up as if it was being managed in a separate repository. Additionally the way it is set up causes confusion and complications.

I am working on some clean up which will:

  • Remove extending the configuration from eslint:recommended and plugin:mozilla/recommended - these are not required since the newtab directory inherits from the top-level .eslintrc.js of the source directory.
    • This also means we don't have to redo the application of test configurations to xpcshell & browser tests.
  • Stops marking everything as a module. This was causing issues such as:
    • enabling no-unused-vars at the global scope on the head.js files for tests,
    • not enabling rules when they should be enabled as they don't apply to modules.
  • Collapses the configurations from the content-src and test directories into browser/components/newtab/.eslintrc.js
    • This centralises everything and makes it easier to know what applies.
  • Disables no-insecure-url on a line/file basis rather than in the main configuration (the general idea is to do this).
  • Fixes some ESLint issues that are raised due to the fixed configuration.
Status: NEW → ASSIGNED
Iteration: --- → 117.1 - July 3 - July 14
Priority: -- → P1
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5885b3e8a831
Simplify and fix newtab's ESLint configuration. r=aminomancer
Pushed by nfay@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d424b425d884
Fix lint failure on MultiSelect.jsx, FeatureCalloutBroker.sys.mjs CLOSED TREE
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 117 Branch
You need to log in before you can comment on or make changes to this bug.