leo-buneev / eslint-plugin-sort-keys-fix

Fork of https://eslint.org/docs/rules/sort-keys that allows automatic fixing
97 stars 23 forks source link

Name all the dependencies this plugin depends on in `package.json` #25

Closed lensbart closed 3 years ago

lensbart commented 3 years ago

Yarn 2 is a bit more strict in its module resolution requirements. In particular, it requires that all dependencies consumed by a module are mentioned in its package.json.

eslint-plugin-sort-keys-fix violates this requirement by not listing espree, esutils or natural-compare in its dependencies. A simple fix would be to list these dependencies.

When using the ESLint VSCode plugin, the plugin won’t run unless the following is supplied in .yarnrc.yml as a temporary fix:

packageExtensions:
  # awaiting fix: https://github.com/leo-buneev/eslint-plugin-sort-keys-fix/issues/25
  eslint-plugin-sort-keys-fix@*:
    dependencies:
      espree: '*'
      esutils: '*'
      natural-compare: '*'
Stephen2 commented 3 years ago

Thanks for listing the workaround. I guess I can put up a PR if there isn't one already

Stephen2 commented 3 years ago

Damn, looks like we already have one: https://github.com/leo-buneev/eslint-plugin-sort-keys-fix/pull/23 but the maintainer isn't active

leo-buneev commented 3 years ago

Fixed in #23, apologies for delay everyone. Released in 1.1.2.