googlearchive / polylint

Lint polymer!
BSD 3-Clause "New" or "Revised" License
116 stars 19 forks source link

polylint picking up the wrong import #110

Open ankon opened 8 years ago

ankon commented 8 years ago

(Follow-up to https://github.com/PolymerElements/paper-button/issues/107)

I have a regular element on which I'm running polylint (collaborne-login), and the tree looks like this:

$HOME/project
+-- collaborne-login
|       +-- bower_components
|       |     +-- paper-button/...
|       +-- collaborne-login.html
+-- paper-button
      +-- paper-button.html

I'm running polylint inside $HOME/project/collaborne-login.

collaborne-login.html imports paper-button as ../paper-button/paper-button.html.

The $HOME/project/paper-button directory is a (fairly old) working copy of paper-button, and polylint chose that one, leading to a linting failure.

I seems polylint should try to avoid leaving its working directory, and pick files from bower_components instead; more generically probably: avoid crossing the directory that contains a bower_components directory?

ankon commented 8 years ago

Just to be explicit: Removing/renaming $HOME/project/paper-button makes polylint pass.