Ah!! Good idea that is exactly something I would enjoy. Can see adding a few:
impcn -> import cn from 'classnames'
impsc -> import styled from 'styled-components'
I'll say I've been impressed with auto-import
(type the thing that is not imported and it's magically imported)
-
-
Replying to @erikaybar_ @WebStormIDE
They work really really well with named exports, not so well default exports (default exports are forbidden in my team because of this
)1 reply 0 retweets 0 likes -
Replying to @0xClpz @erikaybar_
We are trying to be cautious with default exports from node_modules and only offer a quick-fix suggesting the import.pic.twitter.com/GmtuA5p6PF
2 replies 0 retweets 2 likes -
Replying to @WebStormIDE @erikaybar_
This doesn't work for me sadly, on the latest version of webstormpic.twitter.com/gYkQfLTB4B
1 reply 0 retweets 0 likes -
Replying to @0xClpz
Can you please check that `styled-components` is listed as a dependency in package.json and that the Missing import statement inspection is enabled in Preferences | Editor | Inspections.
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
Styled components is in my package.json and the missing import statement inspection is indeed enabled, missing imports work fairly well with what's in my src folder but not my node_modules
1 reply 0 retweets 0 likes -
Replying to @0xClpz
You use WebStorm 2018.3, right? What styled-components version do you have?
1 reply 0 retweets 0 likes -
Replying to @WebStormIDE
I upgraded to 2019.1 this morning, im running styled-components 3.3.2
1 reply 0 retweets 0 likes -
Replying to @0xClpz
Sorry, still no luck reproducing the problem, even with the exactly the same version of styled-components. In general, the inspection should suggest imports and in some cases even auto imports should work for symbols from the packages in node_modules.
2 replies 0 retweets 0 likes -
Replying to @WebStormIDE
I'll save my settings, try a fresh install and if that still doesn't work I'll send you a stripped down version of my repo
1 reply 0 retweets 0 likes
Can you please try if it works for you in this sample project: https://github.com/prigara/import-suggestions-for-styled-components …
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.