Twin.macro: Eslint telling me should be installed in dependencies, not devDependencies

Created on 20 May 2020  路  1Comment  路  Source: ben-rogerson/twin.macro

Using Next.js + Emotion + twin.macro

Warning: twin.macro' should be listed in the project's dependencies, not devDependencies.

I'm actually a little confused, since the docs say twin.macro is a devDependency, but emotion is a dependency. And since I'm importing twin.macro into my code, shouldn't it be a dependency? Is eslint correct?

Thanks!

bug

Most helpful comment

Hi @tettoffensive, thanks for using Twin!

This error comes from the eslint rule import/no-extraneous-dependencies

As you can see, generally if you import a dependency then it should be listed in your dependencies, not in your dev dependencies.

The styled-components official docs they are installing styled-components as a dependency, not a dev dependency, so I think this is even more evidence that Twin should follow suit.

Thank you for flagging this issue!

>All comments

Hi @tettoffensive, thanks for using Twin!

This error comes from the eslint rule import/no-extraneous-dependencies

As you can see, generally if you import a dependency then it should be listed in your dependencies, not in your dev dependencies.

The styled-components official docs they are installing styled-components as a dependency, not a dev dependency, so I think this is even more evidence that Twin should follow suit.

Thank you for flagging this issue!

Was this page helpful?
0 / 5 - 0 ratings