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

Receiving Warning: Package eslint-plugin-typescript-sort-keys has been ignored because it contains invalid configuration. #27

Closed worldlee78 closed 3 years ago

worldlee78 commented 3 years ago

Hey, great package, use it all the time. So thank you.

I have noticed that I get the following warning when I started using your library:

Package eslint-plugin-typescript-sort-keys has been ignored because it contains invalid configuration. Reason: Package subpath './package.json' is not defined by "exports" in <redacted>/node_modules/eslint-plugin-typescript-sort-keys/package.json

I think this is because you are using the "exports" property in the package.json file, which explicitly lists the files used by named exports. Because package.json is not a named export, it throws this warning.

This warning is described here. The solution seems to be described here

I believe I can fix this with a simple patch. I will prepare a pull request for your review.