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

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

Add espree, esutils, and natural-compare to dependencies #20

Closed keegan-lillo closed 2 years ago

keegan-lillo commented 4 years ago

Thanks for the awesome plugin!

However, I ran into the following error when using it in a Yarn 2 project.

Error: Failed to load plugin 'sort-keys-fix' declared in '.eslintrc.js': eslint-plugin-sort-keys-fix tried to access esutils, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.

I have added these to the package.json. I mirrored exactly the versions that the require calls were actually resolving to, so this is why there are no changes to the yarn.lock file.

In the mean time, Yarn 2 users can add the following to their .yarnrc.yml

packageExtensions:
  eslint-plugin-sort-keys-fix@1.1.1:
    dependencies:
      esutils: '^2.0.2'
      espree: '^6.1.2'
      natural-compare: '^1.4.0'

https://yarnpkg.com/configuration/yarnrc#packageExtensions

leo-buneev commented 2 years ago

Thank you, and apologies for long delay. Merged in #23