🎨 resolve linter errors (single quotes / no semicolons / no unused variables)

This commit is contained in:
Kevin van der Werff
2019-10-01 14:13:06 +02:00
parent 405e0d61cb
commit 0e49dc795d
6 changed files with 28 additions and 32 deletions

View File

@@ -7,8 +7,8 @@
<script> <script>
export default { export default {
methods: { methods: {
goToHome(){ goToHome() {
this.$router.push("/") this.$router.push('/')
} }
} }
} }
@@ -26,16 +26,14 @@ export default {
cursor: pointer; cursor: pointer;
} }
.gem { .gem {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI0OHB4IiBoZWlnaHQ9IjQ4cHgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgNDggNDgiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwb2x5Z29uIGZpbGw9IiMwRDQ3QTEiIHBvaW50cz0iMzMsMTcgNDMsMTcgMjQsNDIgIi8+PHBvbHlnb24gZmlsbD0iIzg0RkZGRiIgcG9pbnRzPSI1LDE3IDE1LDUgMTUsMTcgIi8+PHBvbHlnb24gZmlsbD0iIzE5NzZEMiIgcG9pbnRzPSIzMyw1IDMzLDE3IDQzLDE3ICIvPjxnPjxwb2x5Z29uIGZpbGw9IiMwMDkxRUEiIHBvaW50cz0iMTUsMTcgMjMuOTk2LDQyLjE0OSAzMywxNyAiLz48cG9seWdvbiBmaWxsPSIjMDA5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aW50cz0iMzMsMTcgNDMsMTcgMjQsNDIgIi8+PHBvbHlnb24gZmlsbD0iIzg0RkZGRiIgcG9pbnRzPSI1LDE3IDE1LDUgMTUsMTcgIi8+PHBvbHlnb24gZmlsbD0iIzE5NzZEMiIgcG9pbnRzPSIzMyw1IDMzLDE3IDQzLDE3ICIvPjxnPjxwb2x5Z29uIGZpbGw9IiMwMDkxRUEiIHBvaW50cz0iMTUsMTcgMjMuOTk2LDQyLjE0OSAzMywxNyAiLz48cG9seWdvbiBmaWxsPSIjMDA5MUVBIiBwb2ludHM9IjE1LDUgMjQsNSAxNSwxNyAiLz48cG9seWdvbiBmaWxsPSIjMDA5MUVBIiBwb2ludHM9IjI0LDUgMzMsMTcgMzMsNSAiLz48L2c+PGc+PHBvbHlnb24gZmlsbD0iIzAwQjBGRiIgcG9pbnRzPSIzMywxNyAxNSwxNyAyNCw1ICIvPjxwb2x5Z29uIGZpbGw9IiMwMEIwRkYiIHBvaW50cz0iMzMsMTcgMzgsMTUgNDMsMTcgMzgsMTkgIi8+PC9nPjxnPjxwb2x5Z29uIGZpbGw9IiMwMEU1RkYiIHBvaW50cz0iMTUsMTcgNSwxNyAyMy45OTYsNDIuMTQ5ICIvPjxwb2x5Z29uIGZpbGw9IiMwMEU1RkYiIHBvaW50cz0iMTUsMTcgMjQsMTUgMzMsMTcgMjQsMTkgIi8+PC9nPjxwb2x5Z29uIGZpbGw9IiNFMEY3RkEiIHBvaW50cz0iNSwxNyAxMCwxNSAxNSwxNyAxMCwxOSAiLz48L3N2Zz4=);
background-size: cover; background-size: cover;
width:35px; width: 35px;
height:35px; height: 35px;
} }
p { p {
margin: 0 0 0 .3rem; margin: 0 0 0 0.3rem;
font-size: 14px; font-size: 14px;
} }
} }
</style> </style>

View File

@@ -10,13 +10,13 @@
</template> </template>
<script> <script>
import { mapMutations } from "vuex"; import { mapMutations } from 'vuex'
export default { export default {
data() { data() {
return { return {
categories: [{ slug: "", title: "" }] categories: [{ slug: '', title: '' }]
}; }
}, },
computed: { computed: {
areCardsVisible() { areCardsVisible() {
@@ -28,10 +28,10 @@ export default {
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
toggleCardsVisible: "Sidebar/toggleCardsVisible" toggleCardsVisible: 'Sidebar/toggleCardsVisible'
}) })
} }
}; }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -13,7 +13,7 @@
<script> <script>
export default { export default {
props: ['resource', 'isActive', 'createCopyUrl'], props: ['resource', 'isActive', 'createCopyUrl'],
}; }
</script> </script>

View File

@@ -10,16 +10,17 @@
</template> </template>
<script> <script>
import Card from "../components/Card"; import Card from '../components/Card'
import TableRow from "../components/TableRow"; import TableRow from '../components/TableRow'
export default { export default {
components: { Card, TableRow },
data() { data() {
return { return {
categoryRouteTitle: this.$route.params.category, categoryRouteTitle: this.$route.params.category,
index: '', index: '',
activeCard: '', activeCard: '',
}; }
}, },
computed: { computed: {
areCardsVisible() { areCardsVisible() {
@@ -29,6 +30,9 @@ export default {
return this.$store.getters['data/sortByTitle'](this.categoryRouteTitle) return this.$store.getters['data/sortByTitle'](this.categoryRouteTitle)
}, },
}, },
created() {
this.activeCard = this.$route.query.card || ''
},
methods: { methods: {
setActiveCard(index) { setActiveCard(index) {
this.activeCard = index this.activeCard = index
@@ -40,15 +44,11 @@ export default {
this.setActiveCard(cleanTitle) this.setActiveCard(cleanTitle)
this.$router.push(path) this.$router.push(path)
} catch (e) { } catch (e) {
console.error(e); console.error(e)
} }
} }
}, }
created() { }
this.activeCard = this.$route.query.card || ''
},
components: { Card, TableRow }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -1,5 +1,3 @@
const join = require('path').join
module.exports = { module.exports = {
plugins: [ plugins: [
require('autoprefixer') require('autoprefixer')

View File

@@ -5,20 +5,20 @@ if (!Array.prototype.flat) {
Object.defineProperty(Array.prototype, 'flat', { Object.defineProperty(Array.prototype, 'flat', {
configurable: true, configurable: true,
value: function flat () { value: function flat () {
var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]); var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0])
return depth ? Array.prototype.reduce.call(this, function (acc, cur) { return depth ? Array.prototype.reduce.call(this, function (acc, cur) {
if (Array.isArray(cur)) { if (Array.isArray(cur)) {
acc.push.apply(acc, flat.call(cur, depth - 1)); acc.push.apply(acc, flat.call(cur, depth - 1))
} else { } else {
acc.push(cur); acc.push(cur)
} }
return acc; return acc
}, []) : Array.prototype.slice.call(this); }, []) : Array.prototype.slice.call(this)
}, },
writable: true writable: true
}); })
} }
/** /**