Skip to content

Commit 04d852a

Browse files
author
Walker Leite
committed
fix(project): fix lint errors
1 parent 34b3a0b commit 04d852a

File tree

7 files changed

+162
-121
lines changed

7 files changed

+162
-121
lines changed

package-lock.json

Lines changed: 19 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "meta.js",
66
"scripts": {
77
"test": "node test.js",
8-
"lint": "npx eslint ."
8+
"lint": "npx eslint --ext vue,js ."
99
},
1010
"repository": {
1111
"type": "git",
@@ -26,7 +26,7 @@
2626
"eslint": "^4.15.0",
2727
"eslint-config-airbnb-base": "^11.3.0",
2828
"eslint-config-loopback": "^10.0.0",
29-
"eslint-plugin-import": "^2.9.0",
29+
"eslint-plugin-import": "^2.11.0",
3030
"eslint-plugin-vue": "^4.0.0",
3131
"release-it": "^7.4.3",
3232
"vue-cli": "^2.9.1"

template/client/components/HelloWorld/HelloWorld.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
<script>
88
export default {
99
10-
}
10+
};
1111
</script>

template/client/view/Dashboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default {
1919
HeaderContainer,
2020
HelloWorld,
2121
},
22-
}
22+
};
2323
</script>
2424

2525
<style lang="scss" scoped>

template/client/view/Login.vue

Lines changed: 59 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,63 @@
99
<form @submit="onSubmit">
1010
<div class="form-group">
1111
<label for="email">Email</label>
12-
<input type="email"
13-
class="form-control"
14-
id="email"
15-
aria-describedby="emailHelp"
16-
placeholder="Insert your email"
17-
v-model="email"
18-
required>
12+
<input
13+
type="email"
14+
class="form-control"
15+
id="email"
16+
aria-describedby="emailHelp"
17+
placeholder="Insert your email"
18+
v-model="email"
19+
required>
1920
</div>
2021
<div class="form-group">
2122
<label for="senha">Password</label>
22-
<input type="password"
23-
class="form-control"
24-
id="senha"
25-
placeholder="Insert your password"
26-
v-model="password"
27-
required>
23+
<input
24+
type="password"
25+
class="form-control"
26+
id="senha"
27+
placeholder="Insert your password"
28+
v-model="password"
29+
required>
2830
</div>
29-
<div class="alert alert-danger"
30-
role="alert"
31-
v-if="error">\{{error.message}}</div>
31+
<div
32+
class="alert alert-danger"
33+
role="alert"
34+
v-if="error">\{{ error.message }}</div>
3235
<div class="flex">
33-
<a class="link"
36+
<a
37+
class="link"
3438
@click.prevent="$refs.forgotPassword.show()"
3539
href="#">
3640
Forgot your password?
3741
</a>
38-
<button type="submit"
39-
class="btn btn-success">
40-
<i v-if="loading" class="fa fa-spinner"></i>
41-
<i v-else class="fa fa-check"></i>
42+
<button
43+
type="submit"
44+
class="btn btn-success">
45+
<i
46+
v-if="loading"
47+
class="fa fa-spinner"/>
48+
<i
49+
v-else
50+
class="fa fa-check"/>
4251
SIGN IN
4352
</button>
4453
</div>
4554
</form>
4655

4756
<!-- Forgot Password -->
4857
<b-modal
49-
ref="forgotPassword"
50-
title="Recover the password"
51-
size="sm"
52-
@ok="onModalOk"
53-
@shown="onModalShown">
54-
<form ref="forgotPasswordForm" class="forgot-form">
55-
<i v-if="loading" class="fa fa-spinner"></i>
58+
ref="forgotPassword"
59+
title="Recover the password"
60+
size="sm"
61+
@ok="onModalOk"
62+
@shown="onModalShown">
63+
<form
64+
ref="forgotPasswordForm"
65+
class="forgot-form">
66+
<i
67+
v-if="loading"
68+
class="fa fa-spinner"/>
5669
<b-alert
5770
v-if="recoverError"
5871
:show="recoverError !== null"
@@ -66,7 +79,7 @@
6679
placeholder="Insert your email"
6780
v-model="recoverEmail"
6881
@keydown.enter="sendRecoverEmail"
69-
required/>
82+
required>
7083
</form>
7184
</b-modal>
7285

@@ -82,35 +95,35 @@
8295

8396
<script>
8497
export default {
85-
data () {
98+
data() {
8699
return {
87100
email: null,
88101
password: null,
89102
error: null,
90103
recoverError: null,
91104
recoverSuccess: null,
92105
recoverEmail: null,
93-
loading: false
94-
}
106+
loading: false,
107+
};
95108
},
96109
methods: {
97-
onSubmit (evt) {
98-
evt.preventDefault()
99-
this.loading = true
100-
this.error = null
110+
onSubmit(evt) {
111+
evt.preventDefault();
112+
this.loading = true;
113+
this.error = null;
101114
this
102115
.$store
103116
.dispatch('auth/signIn', {
104117
email: this.email,
105-
password: this.password
118+
password: this.password,
106119
})
107120
.then(() => {
108-
this.loading = false
109-
})
110-
.catch(err => {
111-
this.error = err
112-
this.loading = false
121+
this.loading = false;
113122
})
123+
.catch((err) => {
124+
this.error = err;
125+
this.loading = false;
126+
});
114127
},
115128
onModalShown() {
116129
this.$refs.forgotPasswordForm.reset();
@@ -136,16 +149,16 @@ export default {
136149
this.$refs.forgotPassword.hide();
137150
this.$refs.recoverSuccess.show();
138151
})
139-
.catch(err => {
152+
.catch((err) => {
140153
this.loading = false;
141154
this.recoverError = err;
142155
});
143156
} else {
144157
this.recoverError = {message: 'Please, check the inserted email and try again'};
145158
}
146-
}
147-
}
148-
}
159+
},
160+
},
161+
};
149162
</script>
150163

151164
<style lang="scss" scoped>

0 commit comments

Comments
 (0)