Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox committed Mar 2, 2020
1 parent 3ca864b commit 6676c8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ module.exports = {
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow hasOwnProperty
'no-prototype-builtins': 0,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-console': process.env.NODE_ENV === 'production' ? ['error', { "allow": ["error"] }] : 'off',
Expand Down
7 changes: 3 additions & 4 deletions frontend/js/components/LocationField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
const GOOGLEMAPURL = 'https://maps.googleapis.com/maps/api/js?libraries=places&key='
const APIKEY = window[process.env.VUE_APP_NAME].hasOwnProperty('APIKEYS') && window[process.env.VUE_APP_NAME].APIKEYS.hasOwnProperty('googleMapApi') ? window[process.env.VUE_APP_NAME].APIKEYS.googleMapApi : null
/* global google */
export default {
name: 'A17Locationfield',
mixins: [InputMixin, InputframeMixin, LocaleMixin, FormStoreMixin],
Expand Down Expand Up @@ -204,7 +206,7 @@
toggleMap: function () {
this.isMapOpen = !this.isMapOpen
this.mapMessage = this.isMapOpen ? MAPMESSAGE.hide : MAPMESSAGE.show
/* global google */
if (!this.map && typeof google !== 'undefined') {
this.$nextTick(function () {
this.initMap()
Expand Down Expand Up @@ -239,7 +241,6 @@
// Create the autocomplete object and associate it with the UI input control.
this.autocompletePlace = new google.maps.places.Autocomplete(this.$el.querySelector('input[type="search"]'))
// When a place is selected
/* global google */
google.maps.event.addListener(this.autocompletePlace, 'place_changed', this.onPlaceChanged)
if (this.address === '' && this.lat && this.lng) {
Expand Down Expand Up @@ -270,7 +271,6 @@
}
},
mounted: function () {
/* global google */
if (typeof google !== 'undefined') {
this.initGoogleApi()
} else {
Expand All @@ -283,7 +283,6 @@
}
},
beforeDestroy: function () {
/* global google */
if (typeof google !== 'undefined') google.maps.event.clearListeners(this.autocompletePlace, 'place_changed', this.onPlaceChanged)
}
}
Expand Down
2 changes: 1 addition & 1 deletion frontend/js/components/Slideshow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="slideshow">
<draggable class="slideshow__content" v-model="slides" :options="dragOptions" v-if="slides.length">
<transition-group name="draggable_list" tag='div'>
<div class="slide" v-for="(slide, index) in slides" :key="index">
<div class="slide" v-for="(slide, index) in slides" :key="slide.id">
<div class="slide__handle">
<div class="slide__handle--drag"></div>
</div>
Expand Down
3 changes: 1 addition & 2 deletions frontend/js/utils/formDataAsObj.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ export default function (formNode) {
let $domNode
let domNodeValue
const result = {}
let resultLength

for (i = 0; i < $formElements.length; i++) {
$domNode = $formElements[i]
Expand Down Expand Up @@ -433,7 +432,7 @@ export default function (formNode) {
}

// Check the length of the result.
resultLength = getObjLength(result)
const resultLength = getObjLength(result)

return resultLength > 0 ? result : false
}
Expand Down

0 comments on commit 6676c8e

Please sign in to comment.