Page MenuHomePhabricator

[Chore] 🚧Fix deprecated rules in @wmde/eslint-config-wikimedia-typescript
Closed, ResolvedPublic

Description

The v0.2.14 release of @wmde/eslint-config-wikimedia-typescript upgrades its dependency eslint-config-wikimedia to v0.32.3, which depends on a newer version of eslint. This seems to push the @typescript-eslint/eslint-plugin version in @wmde/eslint-config-wikimedia-typescript to a version that no longer contains some rules required by the configuration:

1:1  error  Definition for rule '@typescript-eslint/indent' was not found                   @typescript-eslint/indent
1:1  error  Definition for rule '@typescript-eslint/member-delimiter-style' was not found   @typescript-eslint/member-delimiter-style
1:1  error  Definition for rule '@typescript-eslint/type-annotation-spacing' was not found  @typescript-eslint/type-annotation-spacing
1:1  error  Definition for rule '@typescript-eslint/semi' was not found                     @typescript-eslint/semi

These rules have been moved to eslint-stylistic.

Currently no Wikimedia codebase uses @wmde/eslint-config-wikimedia-typescript at the latest version, and I suspect this set of dependencies does not work for anyone.

Update the package so that it no longer references deprecated rules, and pulls them in from stylistic instead.

Acceptance Criteria

  • References are no longer made to deprecated / removed rules
  • A new version of the package is published
  • WikibaseLexeme is upgraded to the latest version of the package, and can install its dependencies without conflicts, and without linting failures.

Event Timeline

Change #1333725 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/WikibaseLexeme@master] Remove @wmde/eslint-config-typescript, upgrade eslint-config-wikimedia

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

I had a look at this. All of the typescript linting rules in @wmde/eslint-config-wikimedia-typescript (in typescript.js) are already included in eslint-config-wikimedia. We can just drop the @wmde library (and we should probably deprecate it).

Change #1333725 merged by jenkins-bot:

[mediawiki/extensions/WikibaseLexeme@master] Drop eslint-config-wikimedia-typescript, bump eslint-config-wikimedia

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

I have now deprecated the latest version of the package on npm and marked it as deprecated in its README.