Skip to content

Commit

Permalink
Fix all lint warnings.
Browse files Browse the repository at this point in the history
Found one maybe-legit bug where we were setting the name property instead of the name attribute in an iron-selector with attr-for-selected.

Found a few more places where there were missing imports.

And finally, found a few places where the analyzer or a lint rule got confused. Filed bugs or sent PRs for all those.
  • Loading branch information
rictic committed Mar 18, 2017
1 parent 83d576c commit 72db689
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 4 deletions.
7 changes: 6 additions & 1 deletion src/shop-analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<script>
if (false) {
// For the analyzer's benefit, it doesn't know about v0 vanilla element
// syntax, so pretend shop-analytics is a v1 element.
customElements.define('shop-analytics', class extends HTMLElement {});
}
document.registerElement('shop-analytics', {
prototype: {
__proto__: HTMLElement.prototype,
Expand All @@ -22,4 +27,4 @@
}
}
});
</script>
</script>
31 changes: 29 additions & 2 deletions src/shop-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,25 @@
<link rel="import" href="../bower_components/iron-media-query/iron-media-query.html">
<link rel="import" href="../bower_components/iron-pages/iron-pages.html">
<link rel="import" href="../bower_components/iron-selector/iron-selector.html">
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="shop-category-data.html">
<!-- Since 'home' is the default route, eagerly load it. -->
<link rel="import" href="shop-home.html">



<dom-module id="shop-app">
<!--
TODO(ricitc): make these lazy-imports after
https://github.com/Polymer/polymer-analyzer/pull/543 lands
DO NOT MERGE until then :)
-->
<link rel="import" href="shop-cart-data.html">
<link rel="import" href="lazy-resources.html">
<link rel="import" href="shop-list.html">
<link rel="import" href="shop-detail.html">
<link rel="import" href="shop-cart.html">
<link rel="import" href="shop-checkout.html">

<template>

Expand Down Expand Up @@ -279,7 +293,7 @@
selected="[[categoryName]]"
attr-for-selected="name">
<template is="dom-repeat" items="[[categories]]" as="category" initial-count="4">
<shop-tab name="[[category.name]]">
<shop-tab name$="[[category.name]]">
<a href="/list/[[category.name]]">[[category.title]]</a>
</shop-tab>
</template>
Expand Down Expand Up @@ -347,6 +361,18 @@
value: 0
},

/** Data extracted from url segments. */
routeData: Object,

/** True when the window is small. */
smallScreen: Boolean,

categoryName: String,

drawerOpened: Boolean,

offline: Boolean,

_shouldShowTabs: {
computed: '_computeShouldShowTabs(page, smallScreen)'
},
Expand All @@ -357,7 +383,8 @@

_shouldRenderDrawer: {
computed: '_computeShouldRenderDrawer(smallScreen, loadComplete)'
}
},
_a11yLabel: String,
},

observers: [
Expand Down
7 changes: 7 additions & 0 deletions src/shop-button.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,11 @@

</style>
</template>
<script>
// TODO(rictic): how does this work with just a dom-module? Is that kosher?
// https://github.com/Polymer/polymer-analyzer/issues/573
if (false) {
Polymer({is: 'shop-button'});
}
</script>
</dom-module>
1 change: 1 addition & 0 deletions src/shop-cart-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<link rel="import" href="shop-icons.html">
<link rel="import" href="shop-image.html">
<link rel="import" href="shop-select.html">
<link rel="import" href="shop-md-decorator.html">

<dom-module id="shop-cart-item">

Expand Down
2 changes: 2 additions & 0 deletions src/shop-cart.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
-->

<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/iron-icon/iron-icon.html">
<link rel="import" href="shop-button.html">
<link rel="import" href="shop-cart-item.html">
<link rel="import" href="shop-common-styles.html">
<link rel="import" href="shop-form-styles.html">

Expand Down
6 changes: 6 additions & 0 deletions src/shop-checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,10 @@

</style>
</template>
<script>
// TODO(rictic): how does this work with just a dom-module? Is that kosher?
if (false) {
Polymer({is: 'shop-checkbox'});
}
</script>
</dom-module>
7 changes: 6 additions & 1 deletion src/shop-checkout.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/app-route/app-route.html">
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../bower_components/iron-pages/iron-pages.html">
<link rel="import" href="../bower_components/iron-icon/iron-icon.html">
<link rel="import" href="../bower_components/paper-spinner/paper-spinner-lite.html">
<link rel="import" href="shop-button.html">
<link rel="import" href="shop-common-styles.html">
<link rel="import" href="shop-checkbox.html">
<link rel="import" href="shop-form-styles.html">
<link rel="import" href="shop-input.html">
<link rel="import" href="shop-md-decorator.html">
<link rel="import" href="shop-select.html">
<link rel="import" href="shop-checkbox.html">
<link rel="import" href="shop-underline.html">

<dom-module id="shop-checkout">

Expand Down
3 changes: 3 additions & 0 deletions src/shop-detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
<link rel="import" href="shop-category-data.html">
<link rel="import" href="shop-common-styles.html">
<link rel="import" href="shop-image.html">
<link rel="import" href="shop-md-decorator.html">
<link rel="import" href="shop-network-warning.html">
<link rel="import" href="shop-select.html">
<link rel="import" href="shop-underline.html">

<dom-module id="shop-detail">

Expand Down
6 changes: 6 additions & 0 deletions src/shop-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,10 @@

</style>
</template>
<script>
// TODO(rictic): how does this work with just a dom-module? Is that kosher?
if (false) {
Polymer({is: 'shop-input'});
}
</script>
</dom-module>
1 change: 1 addition & 0 deletions src/shop-list-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<link rel="import" href="../bower_components/polymer/polymer.html">
<link rel="import" href="../bower_components/iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="./shop-image.html">

<dom-module id="shop-list-item">

Expand Down
2 changes: 2 additions & 0 deletions src/shop-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<link rel="import" href="shop-common-styles.html">
<link rel="import" href="shop-image.html">
<link rel="import" href="shop-list-item.html">
<link rel="import" href="shop-network-warning.html">


<dom-module id="shop-list">

Expand Down
11 changes: 11 additions & 0 deletions src/shop-md-decorator.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<script>
/**
* TODO(rictic): So this element just doesn't exist at all, and is just used
* as a hook for styling?
* https://github.com/Polymer/polymer-linter/issues/60
*/
if (false) {
Polymer({is: 'shop-md-decorator'});
}
</script>
6 changes: 6 additions & 0 deletions src/shop-select.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,10 @@

</style>
</template>
<script>
// TODO(rictic): how does this work with just a dom-module? Is that kosher?
if (false) {
Polymer({is: 'shop-select'});
}
</script>
</dom-module>
11 changes: 11 additions & 0 deletions src/shop-underline.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<link rel="import" href="../bower_components/polymer/polymer.html">
<script>
/**
* TODO(rictic): So this element just doesn't exist at all, and is just used
* as a hook for styling?
* https://github.com/Polymer/polymer-linter/issues/60
*/
if (false) {
Polymer({is: 'shop-underline'});
}
</script>

0 comments on commit 72db689

Please sign in to comment.