Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Fixes linting errors; corrects linting path in npm script.
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondrabeck committed Nov 13, 2017
1 parent f3b2ce8 commit dca99cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"bower": "*"
},
"scripts": {
"lint": "jshint \"titanium-address-input.js\" --extract=always",
"lint": "jshint \"titanium-address-input.html\" --extract=always",
"test": "npm run lint && npm run p1-demo:setup && npm run p2-demo:setup",
"p1-demo:setup": "cd demo/polymer1 && npm i && npm run build",
"p2-demo:setup": "cd demo/polymer2 && npm i && npm run build",
Expand Down
11 changes: 6 additions & 5 deletions titanium-address-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<script>
if (Polymer.Element) {
// Polymer 2
/*global google */
class TitaniumAddressInput extends Polymer.mixinBehaviors([Polymer.IronValidatableBehavior, Polymer.IronFormElementBehavior],
Polymer.Element) {
static get is() {
Expand Down Expand Up @@ -120,7 +121,7 @@
}

static get observers() {
return ['onValueChanged(value)', 'onAddressChanged(address)']
return ['onValueChanged(value)', 'onAddressChanged(address)'];
}

onAddressChanged(address) {
Expand All @@ -131,13 +132,13 @@
this.set('value', this._formatAddress(address.street, address.city, address.state, address.zipCode));
this._ignoreChange = false;
}
onValueChanged(value) {
onValueChanged() {
if (this._ignoreChange) {
return;
}
this.address = null;
}
_getValidity(value) {
_getValidity() {
if (!this.required && !(!!this.value && !this.address))
return true;

Expand Down Expand Up @@ -297,13 +298,13 @@
this.set('value', this._formatAddress(address.street, address.city, address.state, address.zipCode));
this._ignoreChange = false;
},
onValueChanged(value) {
onValueChanged() {
if (this._ignoreChange) {
return;
}
this.address = null;
},
_getValidity(value) {
_getValidity() {
if (!this.required && !(!!this.value && !this.address))
return true;

Expand Down

0 comments on commit dca99cc

Please sign in to comment.