PolymerElements / paper-button

A button à la Material Design
https://www.webcomponents.org/element/PolymerElements/paper-button
138 stars 64 forks source link

polylint failing on paper-button #107

Closed ankon closed 8 years ago

ankon commented 8 years ago
../paper-button/paper-button.html:144:5
    Property '_elevation' bound to attribute 'elevation' not found in 'properties' for element 'paper-button'

I'm not sure exactly when this started, but given that polylint now produces build errors in projects depending on paper-button it is quite annoying.

ankon commented 8 years ago

As a work-around I've now disabled polylint for the affected projects.

keanulee commented 8 years ago

@justinfagnani @garlicnation Any idea what this is about? elevation is a read-only property provided by PaperButtonBehavior used for styling (reflectToAttribute: true).

garlicnation commented 8 years ago

@ankon which version of paper-button are you using?

garlicnation commented 8 years ago

I can't replicate this with the latest release, or at master.

ankon commented 8 years ago

According to .bower.json in my bower_components directory: 1.0.11.

I've reinstalled today node 5.8.0/npm 3.7.3, and then also did a npm install -g polylint, to be sure. One thing I find weird: according to $NODE/lib/node_modules/polylint/package.json I have polylint 2.10.0, but https://github.com/PolymerLabs/polylint only has 2.9.1 as latest release.

  "dist": {
    "shasum": "9d3357def3e99d02c6b2774d7f969b93533cb1f7",
    "tarball": "http://registry.npmjs.org/polylint/-/polylint-2.10.0.tgz"
  },
  "gitHead": "25ea7986a67a17d98647f7a1294740c58b8e59ee",
  "homepage": "https://github.com/PolymerLabs/polylint",
garlicnation commented 8 years ago

@ankon 2.10.0 didn't get pushed as a git tag, I believe.

Can you put your copy paper-button on a gist?

garlicnation commented 8 years ago

The property you called out doesn't exist in the repo: https://github.com/PolymerElements/paper-button/blob/master/paper-button.html#L144

ankon commented 8 years ago

Good news, everyone ... paper-button is fine, the problem appeared to be a local situation.

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

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 picked up that one, instead of the one in bower_components.

As briefly discussed in slack, this looks more like an issue with polylint preferring the "wrong" file.