Jdforrester-WMF added a subscriber: DanielFriesen.
Jdforrester-WMF added a comment.


  In T222707#5164954 <https://phabricator.wikimedia.org/T222707#5164954>, 
@Michael wrote:
  
  > In T222707#5164890 <https://phabricator.wikimedia.org/T222707#5164890>, 
@Jdforrester-WMF wrote:
  >
  > > The coding standard you link is not "MediaWiki's", it's Wikimedia's, and 
is meant to apply to all production code. I disagree with your argument (the 
developer community <https://www.mediawiki.org/wiki/Front-end_standards_group> 
has had this conversation before and decided that easier portability to JSON is 
more important than cleaner diffs), but if you want to start a new conversation 
about changing it I'd be happy to facilitate.
  >
  >
  > I would like to read up on the existing discussion first, because the 
provided argument seems implausible to me and I would like to understand better 
first, before starting the discussion anew.
  >
  > However, I cannot find the discussion in any of the subpages from the link 
you provided. See https://w.wiki/3ix
  >  Also, the tasks of #front-end-standards-group 
<https://phabricator.wikimedia.org/tag/front-end-standards-group/> don't seem 
to contain this discussion: 
https://phabricator.wikimedia.org/search/query/go0g6aHL_QY8/#R
  
  
  I don't know where the discussion would have been documented, if anywhere. I 
vaguely recall some discussion about it as an existing rule in ~2012/2013 in 
terms of consistency with JSON.
  
  > And this rule was already there in the first commit of the GitHub repo.
  
  Yes, it was an existing rule when we switched from `jscs` to `eslint` and so 
was imported from those rules.
  
  In our jscs ruleset 
<https://github.com/wikimedia/jscs-preset-wikimedia/blob/master/presets/wikimedia.json#L59>
 it was originally implemented back in 2014 
<https://github.com/wikimedia/jscs-preset-wikimedia/commit/d7f24e0b6c7bbe25a5ce427a2c6cbda09306eb71>
 as a codification of what the coding conventions document 
<https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript> 
instructed then.
  
  Before we used `jscs`, it was previously enforced via jshint (`"trailing": 
true`). The first version of the JS-specific coding conventions 
<https://www.mediawiki.org/w/index.php?title=Manual:Coding_conventions/JavaScript&oldid=469441>
 split out by @krinkle in December 2011 said:
  
  > When using an object literal, don't include a trailing comma. `var obj = { 
a: 1, b: 2, };` will fail in some versions of IE while `var obj = { a: 1, b: 2 
};` will work universally.
  
  It was originally added to our coding standards in this edit 
<https://www.mediawiki.org/w/index.php?title=Manual:Coding_conventions&type=revision&diff=465565&oldid=362358&diffmode=source>
 by @DanielFriesen.
  
  Obviously the need to not crash IE4 is now gone, but I don't know if any 
proper conversation has been had about changing this convention. The casual 
discussion I remember about JSON-style certainly wasn't a full process.
  
  Hope this archæology helps!

TASK DETAIL
  https://phabricator.wikimedia.org/T222707

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Jdforrester-WMF
Cc: DanielFriesen, Aklapper, alaa_wmde, Jdforrester-WMF, Krinkle, Michael, 
darthmon_wmde, Onmir, DannyS712, Nandana, Mh-3110, Lahi, Gq86, 
GoranSMilovanovic, Jayprakash12345, QZanden, enigmaeth, rohitt, LawExplorer, 
Flycatchr, _jensen, rosalieper, Jonas, Dixtosa, Volker_E, SBisson, 
Wikidata-bugs, aude, Dinoguy1000, Lydia_Pintscher, Mbch331, Jay8g
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to