Page MenuHomePhabricator

Stop using _this, use this
Closed, ResolvedPublic

Description

UploadWizard has an _epidemic_ unnecessary use of "_this". Let's start using "self" or similar where necessary and "this" where possible.


Version: unspecified
Severity: enhancement

Details

Reference
bz50322

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 22 2014, 1:43 AM
bzimport set Reference to bz50322.
bzimport added a subscriber: Unknown Object (MLST).

Change 80523 had a related patch set uploaded by MarkTraceur:
Loads of work on jshint fixes

https://gerrit.wikimedia.org/r/80523

Change 80523 merged by jenkins-bot:
Loads of work on jshint fixes

https://gerrit.wikimedia.org/r/80523

Still a few more:

$ ack _this -Q -c | grep -v ':0'
resources/jquery/jquery.mwCoolCats.js:14
resources/mw.UploadWizard.js:2
resources/mw.UploadWizardDeed.js:70
resources/mw.UploadWizardDescription.js:14
resources/mw.UploadWizardDetails.js:230
resources/mw.UploadWizardLicenseInput.js:65
resources/mw.UploadWizardUpload.js:83
resources/mw.UploadWizardUploadInterface.js:92

Should I work on this, or you want to leave it as it is?

I wouldn't mind you fixing it - I think mostly they got fixed in the jshint patches, so it shouldn't be necessary, but I wouldn't mind fixing this bug and then moving on to the rest of the jshint things.

Also notably we changed the policy from being "self" to basically a descriptive word for whatever "this" is in the appropriate scope - e.g. "licenseInput" in a LicenseInput context, "wizard" in an UploadWizard context, "upload" in an UploadWizardUpload context, etc. etc..

matmarex assigned this task to MarkTraceur.
matmarex added a project: Technical-Debt.
matmarex set Security to None.