eslint-plugin-css-modules icon indicating copy to clipboard operation
eslint-plugin-css-modules copied to clipboard

cannot find css class from any package at node_modules

Open AtarisMio opened this issue 8 years ago • 2 comments

when i import a style from a package at node_modules or some others dir not use './xxxx.css', it tell me "Class 'xxx' not found (css-modules/no-undef-class)"

i think the problem is caused by this code. https://github.com/atfzl/eslint-plugin-css-modules/blob/master/lib/rules/no-undef-class.js#L66

may there should have a configure of base directory to find the css files

AtarisMio avatar Nov 12 '17 16:11 AtarisMio

I have the same problem if I use absolute-relative paths 'components/Button/Button.css'.

nikitaMe1nikov avatar Apr 27 '18 05:04 nikitaMe1nikov

@nikitaMe1nikov PR for absolute imports support — https://github.com/atfzl/eslint-plugin-css-modules/pull/41

kangax avatar Aug 28 '18 21:08 kangax