Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit 84724da

Browse files
chore: update linting
1 parent 657007c commit 84724da

19 files changed

+212
-96
lines changed

.eslintrc.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
22
root: true,
33
extends: [
4-
'@nuxtjs'
4+
'@nuxtjs',
5+
'plugin:nuxt/recommended'
56
],
67
parserOptions: {
78
parser: 'babel-eslint',

components/ContactUsModal.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ import { email, minLength, required } from 'vuelidate/src/validators'
139139
140140
export default {
141141
mixins: [validationMixin],
142-
data() {
142+
data () {
143143
return {
144144
name: '',
145145
email: '',
@@ -164,15 +164,15 @@ export default {
164164
}
165165
},
166166
computed: {
167-
empty() {
167+
empty () {
168168
const dataKeys = ['name', 'email', 'msg']
169169
170170
return dataKeys.some(k => !this[k])
171171
},
172-
submissionDisabled() {
172+
submissionDisabled () {
173173
return this.empty || this.$v.$error || this.submitting
174174
},
175-
submitButtonClasses() {
175+
submitButtonClasses () {
176176
const baseClasses = 'ml-4 mt-4 px-6 py-3 rounded transition-all border text-grey-light'
177177
const additionalClasses = this.submissionDisabled
178178
? 'opacity-50 cursor-not-allowed border-grey-light'
@@ -181,7 +181,7 @@ export default {
181181
return `${baseClasses} ${additionalClasses}`
182182
}
183183
},
184-
mounted() {
184+
mounted () {
185185
const keyHandler = (event) => {
186186
if (event.keyCode !== 27) {
187187
return
@@ -196,14 +196,14 @@ export default {
196196
})
197197
},
198198
methods: {
199-
validate() {
199+
validate () {
200200
if (this.submissionDisabled) {
201201
return
202202
}
203203
204204
this.submitForm()
205205
},
206-
async submitForm() {
206+
async submitForm () {
207207
this.submitting = true
208208
this.$ga.event('submit', 'form', this.$i18n.locale)
209209
this.error = false

components/Navbar.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,30 +80,30 @@ import Consent from '~/components/Consent'
8080
8181
export default {
8282
components: { Consent },
83-
data() {
83+
data () {
8484
return {
8585
isUncollapsed: false,
8686
scrollOffset: 0
8787
}
8888
},
8989
computed: {
90-
isUserScrolling() { return this.scrollOffset },
91-
navClasses() {
90+
isUserScrolling () { return this.scrollOffset },
91+
navClasses () {
9292
return {
9393
'pt-2 lg:pt-2 bg-rains': this.isUserScrolling || this.isUncollapsed,
9494
'bg-transparent': !this.isUserScrolling
9595
}
9696
},
97-
subNavClasses() {
97+
subNavClasses () {
9898
return {
9999
'py-2 lg:py-2': this.isUserScrolling
100100
}
101101
},
102-
otherLocales() {
102+
otherLocales () {
103103
return this.$i18n.locales.filter(({ code }) => code !== this.$i18n.locale)
104104
}
105105
},
106-
mounted() {
106+
mounted () {
107107
this.handleScroll()
108108
109109
const resizeHandler = () => {
@@ -118,10 +118,10 @@ export default {
118118
})
119119
},
120120
methods: {
121-
toggleVisibility() {
121+
toggleVisibility () {
122122
this.isUncollapsed = !this.isUncollapsed
123123
},
124-
handleScroll() {
124+
handleScroll () {
125125
this.scrollOffset = window.scrollY
126126
}
127127
},

components/work/AnimatedNumber.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ export default {
2929
required: true
3030
}
3131
},
32-
data() {
32+
data () {
3333
return {
3434
number: null,
3535
state: 0
3636
}
3737
},
3838
watch: {
3939
shouldStart: {
40-
handler(newValue) {
40+
handler (newValue) {
4141
if (newValue) {
4242
this.start()
4343
}
@@ -46,10 +46,10 @@ export default {
4646
}
4747
},
4848
methods: {
49-
updateNumber(state) {
49+
updateNumber (state) {
5050
this.number = Number(state.x).toFixed(this.precision).toLocaleString()
5151
},
52-
start() {
52+
start () {
5353
if (this.state > 0) {
5454
return
5555
}
@@ -70,7 +70,7 @@ export default {
7070
})
7171
}
7272
},
73-
render(h) {
73+
render (h) {
7474
return h('span', this.number)
7575
}
7676
}

components/work/WorkPreview.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ export default {
6565
}
6666
},
6767
computed: {
68-
bindUrl() {
68+
bindUrl () {
6969
// Looks weird, but is needed to disable links if empty url is provided, because no href will be bound then
7070
return this.url.length ? { href: `${this.url}?ref=developmint.de` } : {}
7171
},
72-
imageSources() {
72+
imageSources () {
7373
return {
7474
src: require(`~/assets/img/work/${this.slug}.jpg`),
7575
srcset: `${require(`~/assets/img/work/${this.slug}@2x.jpg`)} 2x`

layouts/default.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@ export default {
1919
AppFooter: () => import('~/components/Footer'),
2020
ContactUs: () => import('~/components/ContactUsModal')
2121
},
22-
data() {
22+
data () {
2323
return {
2424
showContactUsModal: false
2525
}
2626
},
2727
watch: {
28-
$route(to) {
28+
$route (to) {
2929
this.checkForHash(to)
3030
}
3131
},
32-
mounted() {
32+
mounted () {
3333
this.checkForHash(this.$route)
3434
},
35-
head() {
35+
head () {
3636
return this.$nuxtI18nSeo()
3737
},
3838
methods: {
39-
hideContactUsModal() {
39+
hideContactUsModal () {
4040
this.showContactUsModal = false
4141
if (history.length > 2) {
4242
this.$router.back()
4343
} else {
4444
this.$router.push(this.$route.path)
4545
}
4646
},
47-
checkForHash(to) {
47+
checkForHash (to) {
4848
this.showContactUsModal = to.hash.includes(this.$t('anchors.contact-us'))
4949
}
5050
}

layouts/error.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<script>
2626
export default {
27-
head() {
27+
head () {
2828
return {
2929
title: '404 - There is no software here!'
3030
}

mixins/logClick.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22
export default {
33
methods: {
4-
logClick(icon) {
4+
logClick (icon) {
55
this.$ga.event({
66
eventCategory: 'click',
77
eventAction: `${this.name} - ${icon}`

nuxt.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export default {
9898
},
9999

100100
hooks: {
101-
'generate:distCopied'() {
101+
'generate:distCopied' () {
102102
fs.copyFileSync(path.resolve(__dirname, './_redirects'), path.resolve(__dirname, './dist/_redirects'))
103103
}
104104
},
@@ -139,7 +139,7 @@ export default {
139139
// Simple usage
140140
['@nuxtjs/google-analytics', {
141141
id: 'UA-62902757-7',
142-
disabled: () => document.cookie.indexOf('ga_optout=true') !== -1,
142+
disabled: () => document.cookie.includes('ga_optout=true'),
143143
debug: {
144144
sendHitTask: isProd
145145
},
@@ -231,7 +231,7 @@ export default {
231231
/*
232232
* Run ESLint on save
233233
*/
234-
extend(config, ctx) {
234+
extend (config, ctx) {
235235
if (ctx.isClient) {
236236
if (ctx.isDev) {
237237
config.module.rules.push({

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"@nuxtjs/axios": "^5.4.1",
1717
"@nuxtjs/google-analytics": "^2.2.0",
1818
"@nuxtjs/pwa": "^3.0.0-beta.14",
19+
"eslint-plugin-nuxt": "^0.4.3",
1920
"intersection-observer": "^0.6.0",
2021
"nuxt-edge": "^3.0.0-25886174.42eefa0e",
2122
"nuxt-i18n": "^5.10.0",
@@ -34,18 +35,11 @@
3435
"xss-filters": "^1.2.7"
3536
},
3637
"devDependencies": {
37-
"@nuxtjs/eslint-config": "^0.0.1",
38+
"@nuxtjs/eslint-config": "^1.0.1",
3839
"@nuxtjs/proxy": "^1.3.3",
3940
"babel-eslint": "^10.0.1",
4041
"eslint": "^5.16.0",
41-
"eslint-config-standard": "^12.0.0",
4242
"eslint-loader": "^2.1.2",
43-
"eslint-plugin-import": "^2.17.2",
44-
"eslint-plugin-jest": "^22.5.1",
45-
"eslint-plugin-node": "^8.0.1",
46-
"eslint-plugin-promise": "^4.1.1",
47-
"eslint-plugin-standard": "^4.0.0",
48-
"eslint-plugin-vue": "^5.2.2",
4943
"husky": "^1.3.1",
5044
"netlify-lambda": "^1.4.7",
5145
"standard-version": "^5.0.2"

0 commit comments

Comments
 (0)