Closed Bug 1775028 Opened 2 years ago Closed 2 years ago

Cleanup ESLint unused variables handling in toolkit/components/passwordmgr

Categories

(Toolkit :: Password Manager, task)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(2 files)

Password manager's .eslintrc.js file currently turns off checking for no-unused-vars except at local scope.

Due to this, we're missing checking for unused variables at the global scope in jsm and test files in passwordmgr. There are various places where the code is importing files unnecessarily (and not lazily).

The exclusions applied (ids|ignored|unused) don't seem to be that useful - ignored is not used in the code, unused is only used once and doesn't need to be. ids are included in the code and not used in places, but I don't think that it is really necessary as an exclusion.

Therefore I'd like to remove the special casing for no-unused-vars for passwordmgr, and let it inherit the tree rules, so that we are more consistent and gain the benefits of global scope checking.

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93c7604b0b28
Cleanup ESLint unused variables handling in toolkit/components/passwordmgr. r=sgalich
https://hg.mozilla.org/integration/autoland/rev/4e4de43cfb8f
Cleanup some more unused imports in toolkit/components/passwordmgr. r=sgalich
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: