Page MenuHomePhabricator

Eliminate usage of mocha-eslint
Closed, ResolvedPublic


The mocha-eslint package has not been updated in over a year, and appears abandoned. It requires an outdated eslint version (^4.2.0) that conflicts with the version required for eslint-config-wikimedia (^5.9.0). It should be removed from all node services.

eslint-config-node-services has been deprecated as well, so it should be replaced with eslint-config-wikimedia with service-specific overrides. See gerritbot comments on the ticket for examples.

I'm sure something have been forgotten here,

Event Timeline

Simply replacing the usage of mocha-eslint with latest version of eslint is not a full solution - given that eslint-config-node-services declares eslint as a peer dependency, that creates a peer dependency conflict like T212722

There's been an attempt to unify the configs for javascript within the foundation and as a result eslint-config-wikimedia/server was created. There exist some unanswered questions on which features have to be upstreamed to the Wikimedia config (T211138 and ) and how the services have to be changed to accommodate the new config.

As a first step towards finally switching to unified eslint-config-wikimedia, I propose to use this task to collect data on still missing non-unified pieces (tabs vs spaces) is an obvious one. So the services and libs mentioned in the task description have to begin using 'esilnt-config-wikimedia/server' and explicitly use service-specific overrides in .eslintrc of each service required for the linting to pass without changing the codebase.

Doing that for at least a subset of repos and having pull requests with explicit lists in place will allow us to finally see what needs to be upstreamed, what needs to change in the codebase and what needs to stay as a service-specific override.

Ok, I'll remove eslint-config-node-services then and override where necessary

Change 488908 had a related patch set uploaded (by Mvolz; owner: Mvolz):
[mediawiki/services/citoid@master] Remove jshint && mocha-eslint

Change 488908 merged by jenkins-bot:
[mediawiki/services/citoid@master] Remove jshint && mocha-eslint

Change 489910 had a related patch set uploaded (by Physikerwelt; owner: Physikerwelt):
[mediawiki/services/mathoid@master] Eliminate mocha-eslint

Change 489910 merged by Mobrovac:
[mediawiki/services/mathoid@master] Eliminate mocha-eslint

Pchelolo updated the task description. (Show Details)

Change 492357 had a related patch set uploaded (by Bmansurov; owner: Bmansurov):
[mediawiki/services/recommendation-api@master] Replace istanbul with nyc

Change 492357 merged by jenkins-bot:
[mediawiki/services/recommendation-api@master] Replace istanbul with nyc

Pchelolo claimed this task.

I've created individual tickets for the services still not addressed. Closing this umbrella ticket.

I've created individual tickets for the services still not addressed. Closing this umbrella ticket.

Usually the umbrella doesn't get closed until the dependencies are? (I've added a task for graphoid.)