0

I'm getting familiar with Meteor and loving it so far. My IDE of choice is Webstorm (PHPStorm) and I've run into an annoyance I wonder if someone has a solution for.

Basically Meteor implements magic when it comes to serving files from the /public directory in that you can leave it off when serving, say in this case, an image. So let's imagine I have this structure:

- public
  - images
    - test.png

And I have this rule in my CSS file:

.some-class{
  background: url('/images/test.png') no-repeat center center;
}

Of course Meteor displays the image fine but Webstorm treats it as a missing file which throws an error in the CSS file. (Webstorm would expect /public/images/test.png).

Is there some way to workaround this so I can avoid the squigglies every time I am entering images? It's a useful feature when it works to let me know I muffed an image path but it appears in this configuration I'm doomed to always have the paths appear broken in my CSS files.

Just curious if anyone had found a way to workaround this without having to go the heavy handed route of turning off the checks.

Thanks all!

Alex
  • 8,461
  • 6
  • 37
  • 49
webkenny
  • 221
  • 1
  • 7

1 Answers1

0

This is software question but your solution is:

Settings -> editor -> inspections then on right panel select css -> invalid element -> uncheck unknown file or directory 

Edited after comment:

Webstorm: “Cannot Resolve Directory”

Community
  • 1
  • 1
Alex
  • 8,461
  • 6
  • 37
  • 49
  • I understand how to turn off inspections thank you. That was my question originally. Was there any way to have Webstorm resolve the paths without taking the heavy handed approach. Thanks for trying though. I appreciate it. – webkenny Dec 05 '15 at 18:17
  • 1
    @webkenny You answer is [here](http://stackoverflow.com/questions/21987225/webstorm-cannot-resolve-directory) – Alex Dec 05 '15 at 18:24
  • And that is exactly what I was looking for. If you want to edit your answer to include this link, I'll accept it. Thank you much! – webkenny Dec 05 '15 at 20:44
  • @webkenny My first aim is to help people not earn reputation. It doesn't matter either accept my answer or don't accept it. – Alex Dec 06 '15 at 12:45
  • 1
    All I meant was that your comment can't be accepted as an answer and it was more accurate than the original. :) That said though you helped me out immensely so I accepted it anyway. Hopefully folks will read comments. Thank you again! – webkenny Dec 06 '15 at 19:36