infctr / eslint-plugin-typescript-sort-keys

A linter plugin to require sorting interface and string enum keys
ISC License
147 stars 28 forks source link

Use `^` to pin dependencies #21

Closed entropitor closed 4 years ago

entropitor commented 4 years ago

When using this plugin in a shared config, all users need to manually install this version, probably because this package is hoisted and I'm guessing this is because of the ~ in the package.json. Is there a reason for this? Could these be changed into a ^?

neviaumi commented 4 years ago

+1 for the same problem.

when used as shared config it need manually install eslint-plugin-typescript-sort-keys every project

E.X. https://github.com/davidNHK/busybox/blob/development/package.json#L16

infctr commented 4 years ago

@entropitor Sorry, I don't follow here, what dependencies should be pinned with ^ instead?

entropitor commented 4 years ago

I've got a Pull Request that should fix it (https://github.com/infctr/eslint-plugin-typescript-sort-keys/pull/24)

I'd personally also advise this to do for the devDependencies but I don't think it's required to make it work.

infctr commented 4 years ago

@entropitor Published latest changes, please give it a try and let me know whether it works as expected

entropitor commented 4 years ago

@infctr I guess the problem is that this package is still using an old version of experimental-utils so when you are using it in a shared config package together with @typescript-eslint, it will fail to install properly because of hoisting. This module is not hoisted to the top level so it's not in the right place for eslint.

Would it be hard to bump the version for @typescript-eslint/experimental-utils? There doesn't seem to be breaking changes: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/experimental-utils/CHANGELOG.md

infctr commented 4 years ago

@entropitor There were a couple of breaking changes concerning typings and probably API, that was the reason it was pinned with ~ in the first place. I'll have a look and try to update it