bmatcuk / eslint-plugin-postcss-modules

Checks that you are using the classes exported by your css modules using postcss.
MIT License
21 stars 7 forks source link

Error has #4

Open agrublev opened 4 years ago

agrublev commented 4 years ago

TypeError: Cannot read property 'has' of undefined Occurred while linting /Users/me3n/DEVELOPMENT/fcdev/packages/common/utils/src/Cache/compress.js:359 at MemberExpression (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint-plugin-postcss-modules/dist/rules/no-undef-class.js:38:30) at listeners.(anonymous function).forEach.listener (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/safe-emitter.js:45:58) at Array.forEach () at Object.emit (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/safe-emitter.js:45:38) at NodeEventGenerator.applySelector (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/node-event-generator.js:254:26) at NodeEventGenerator.applySelectors (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/node-event-generator.js:283:22) at NodeEventGenerator.enterNode (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/node-event-generator.js:297:14) at CodePathAnalyzer.enterNode (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:634:23) at nodeQueue.forEach.traversalInfo (/Users/me3n/DEVELOPMENT/fcdev/node_modules/eslint/lib/linter/linter.js:936:32) at Array.forEach () error Command failed with exit code 2.

bmatcuk commented 4 years ago

Thanks for the bug report, @agrublev! I can see the error occurs while linting your file Cache/compress.js on line 359. I wonder if you might be able to share line 359 with me, and also share the line of code that imports the css file. That might give me a better idea of what's causing the issue. Thanks!

bmatcuk commented 4 years ago

Also, what version of eslint-plugin-postcss-modules are you using?