Page MenuHomePhabricator

Ensure that all repos have sufficient .jshintrc spec
Closed, DeclinedPublic

Description

By T136387 it turned out that CentralNotice has been equipped with insufficient .jshintrc passing ES6 syntax.

rMW /.jshintrc pays attention to esversion which is comforting.

How can be ensured that every .jshintrc in every repo is watching over a set of minimum requirements, not only ES but other options as well?

How many other repos are still equipped less demanding, running into next crash after deployment to users with mid-aged browsers?

The intention of T136408 was to ensure this for all repos, but has been renamed to Update CentralNotice JSHint config and limited itself to one particular repo only and closed. Therefore launching the issue once again.

Event Timeline

Wondering where such checks would need to happen and whether that's Continuous-Integration-Infrastructure or Continuous-Integration-Config (or something else) territory?

matmarex subscribed.

This would probably require both commits to extension repositories, and to CI configuration code. (Unless it turns out that we already do this right in all extensions but CentralNotice.)

I'm not sure what the right projects are either, but there is probably no one who would be responsible for this or interested in this watching JavaScript, so let's add stuff and hope for Cunningham's Law to prove true again. ;)

Yup. This is a "someone, please spend hours manually checking 400 repos for me" task. We have bot tools (@Legoktm uses one in particular) to bump versions and synchronise these config files, but though important it's slow, tedious work.

@Jdforrester-WMF I have been going through all the repos slowly. ive been adding the npm entry point. I haven't added .jshintrc though since that is only needed in repos where there is going to be js tested.

So AIUI, we want a report of all the projects that have a .jshintrc that is different from the one listed at https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript ?

Wondering where such checks would need to happen and whether that's Continuous-Integration-Infrastructure or Continuous-Integration-Config (or something else) territory?

The infrastructure tag is usually for low level system administration related tasks. The config one for repo/job setup. Ideally we would have an umbrella "continuous integration" project. Anyway the config one is appropriate here :-)

hashar triaged this task as Medium priority.Sep 3 2016, 12:23 PM

Repositories are now migrating to eslint and we have a npm package to track the recommended to configuration: https://www.npmjs.com/package/eslint-config-wikimedia

Eg the fix is to stop using per repositories configuration files (.jshintrc) and move toward using a centrally maintained set of config (eslint-config-wikimedia).