Skip to content

Commit 79a5d0e

Browse files
committed
refactor: update packages + lint
1 parent d4d76e5 commit 79a5d0e

37 files changed

+235
-243
lines changed

.eslintrc.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
module.exports = {
22
root: true,
33
env: {
4-
node: true
4+
node: true,
55
},
66
extends: ["plugin:vue/essential", "@vue/prettier"],
77
rules: {
88
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
9-
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off"
9+
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
1010
},
1111
parserOptions: {
12-
parser: "babel-eslint"
13-
}
12+
parser: "babel-eslint",
13+
},
1414
};

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: ["@vue/app"]
2+
presets: ["@vue/app"],
33
};

package.json

+17-17
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@
99
"lint": "vue-cli-service lint"
1010
},
1111
"dependencies": {
12-
"core-js": "3.6.4",
12+
"core-js": "3.18.2",
1313
"chartist": "0.11.4",
14-
"google-maps": "4.2.3",
15-
"vue": "2.6.11",
14+
"google-maps": "4.3.3",
15+
"vue": "2.6.14",
1616
"vue-clickaway": "2.2.2",
1717
"vue-github-buttons": "3.1.0",
18-
"vue-material": "1.0.0-beta-11",
19-
"vue-router": "3.1.6",
20-
"vue-social-sharing": "2.4.7"
18+
"vue-material": "1.0.0-beta-15",
19+
"vue-router": "3.5.2",
20+
"vue-social-sharing": "3.0.8"
2121
},
2222
"devDependencies": {
23-
"@vue/cli-plugin-babel": "4.2.3",
24-
"@vue/cli-plugin-eslint": "4.2.3",
25-
"@vue/cli-plugin-router": "4.2.3",
26-
"@vue/cli-service": "4.2.3",
23+
"@vue/cli-plugin-babel": "4.5.13",
24+
"@vue/cli-plugin-eslint": "4.5.13",
25+
"@vue/cli-plugin-router": "4.5.13",
26+
"@vue/cli-service": "4.5.13",
2727
"@vue/eslint-config-prettier": "6.0.0",
2828
"babel-eslint": "10.1.0",
29-
"eslint": "6.8.0",
30-
"eslint-plugin-prettier": "3.1.2",
31-
"eslint-plugin-vue": "6.2.2",
29+
"eslint": "7.32.0",
30+
"eslint-plugin-prettier": "4.0.0",
31+
"eslint-plugin-vue": "7.19.1",
3232
"es6-promise": "4.2.8",
33-
"prettier": "1.19.1",
34-
"sass": "1.26.2",
35-
"sass-loader": "8.0.2",
36-
"vue-template-compiler": "2.6.11"
33+
"prettier": "2.4.1",
34+
"sass": "1.42.1",
35+
"sass-loader": "10.1.1",
36+
"vue-template-compiler": "2.6.14"
3737
}
3838
}

postcss.config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
plugins: {
3-
autoprefixer: {}
4-
}
3+
autoprefixer: {},
4+
},
55
};

src/components/Cards/ChartCard.vue

+13-13
Original file line numberDiff line numberDiff line change
@@ -22,45 +22,45 @@ export default {
2222
props: {
2323
footerText: {
2424
type: String,
25-
default: ""
25+
default: "",
2626
},
2727
headerTitle: {
2828
type: String,
29-
default: "Chart title"
29+
default: "Chart title",
3030
},
3131
chartType: {
3232
type: String,
33-
default: "Line" // Line | Pie | Bar
33+
default: "Line", // Line | Pie | Bar
3434
},
3535
chartOptions: {
3636
type: Object,
3737
default: () => {
3838
return {};
39-
}
39+
},
4040
},
4141
chartResponsiveOptions: {
4242
type: Array,
4343
default: () => {
4444
return [];
45-
}
45+
},
4646
},
4747
chartData: {
4848
type: Object,
4949
default: () => {
5050
return {
5151
labels: [],
52-
series: []
52+
series: [],
5353
};
54-
}
54+
},
5555
},
5656
dataBackgroundColor: {
5757
type: String,
58-
default: ""
59-
}
58+
default: "",
59+
},
6060
},
6161
data() {
6262
return {
63-
chartId: "no-id"
63+
chartId: "no-id",
6464
};
6565
},
6666
methods: {
@@ -81,16 +81,16 @@ export default {
8181
},
8282
getRandomInt(min, max) {
8383
return Math.floor(Math.random() * (max - min + 1)) + min;
84-
}
84+
},
8585
},
8686
mounted() {
8787
this.updateChartId();
88-
import("chartist").then(Chartist => {
88+
import("chartist").then((Chartist) => {
8989
let ChartistLib = Chartist.default || Chartist;
9090
this.$nextTick(() => {
9191
this.initChart(ChartistLib);
9292
});
9393
});
94-
}
94+
},
9595
};
9696
</script>

src/components/Cards/NavTabsCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88

99
<script>
1010
export default {
11-
name: "nav-tabs-card"
11+
name: "nav-tabs-card",
1212
};
1313
</script>

src/components/Cards/StatsCard.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ export default {
1919
props: {
2020
dataBackgroundColor: {
2121
type: String,
22-
default: ""
23-
}
24-
}
22+
default: "",
23+
},
24+
},
2525
};
2626
</script>

src/components/Dropdown.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ export default {
2626
name: "drop-down",
2727
props: {
2828
title: String,
29-
icon: String
29+
icon: String,
3030
},
3131
data() {
3232
return {
33-
isOpen: false
33+
isOpen: false,
3434
};
3535
},
3636
methods: {
@@ -39,7 +39,7 @@ export default {
3939
},
4040
closeDropDown() {
4141
this.isOpen = false;
42-
}
43-
}
42+
},
43+
},
4444
};
4545
</script>

src/components/NotificationPlugin/Notification.vue

+11-11
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,28 @@ export default {
2929
icon: String,
3030
verticalAlign: {
3131
type: String,
32-
default: "top"
32+
default: "top",
3333
},
3434
horizontalAlign: {
3535
type: String,
36-
default: "center"
36+
default: "center",
3737
},
3838
type: {
3939
type: String,
40-
default: "info"
40+
default: "info",
4141
},
4242
timeout: {
4343
type: Number,
44-
default: 2500
44+
default: 2500,
4545
},
4646
timestamp: {
4747
type: Date,
48-
default: () => new Date()
49-
}
48+
default: () => new Date(),
49+
},
5050
},
5151
data() {
5252
return {
53-
elmHeight: 0
53+
elmHeight: 0,
5454
};
5555
},
5656
computed: {
@@ -63,7 +63,7 @@ export default {
6363
customPosition() {
6464
let initialMargin = 20;
6565
let alertHeight = this.elmHeight + 10;
66-
let sameAlertsCount = this.$notifications.state.filter(alert => {
66+
let sameAlertsCount = this.$notifications.state.filter((alert) => {
6767
return (
6868
alert.horizontalAlign === this.horizontalAlign &&
6969
alert.verticalAlign === this.verticalAlign &&
@@ -78,19 +78,19 @@ export default {
7878
styles.bottom = `${pixels}px`;
7979
}
8080
return styles;
81-
}
81+
},
8282
},
8383
methods: {
8484
close() {
8585
this.$emit("on-close", this.timestamp);
86-
}
86+
},
8787
},
8888
mounted() {
8989
this.elmHeight = this.$el.clientHeight;
9090
if (this.timeout) {
9191
setTimeout(this.close, this.timeout);
9292
}
93-
}
93+
},
9494
};
9595
</script>
9696
<style lang="scss" scoped>

src/components/NotificationPlugin/Notifications.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
import Notification from "./Notification.vue";
2121
export default {
2222
components: {
23-
Notification
23+
Notification,
2424
},
2525
data() {
2626
return {
27-
notifications: this.$notifications.state
27+
notifications: this.$notifications.state,
2828
};
2929
},
3030
methods: {
3131
removeNotification(timestamp) {
3232
this.$notifications.removeNotification(timestamp);
33-
}
34-
}
33+
},
34+
},
3535
};
3636
</script>
3737
<style lang="scss">

src/components/NotificationPlugin/index.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ const NotificationStore = {
44
state: [], // here the notifications will be added
55

66
removeNotification(timestamp) {
7-
const indexToDelete = this.state.findIndex(n => n.timestamp === timestamp);
7+
const indexToDelete = this.state.findIndex(
8+
(n) => n.timestamp === timestamp
9+
);
810
if (indexToDelete !== -1) {
911
this.state.splice(indexToDelete, 1);
1012
}
@@ -18,41 +20,41 @@ const NotificationStore = {
1820
},
1921
notify(notification) {
2022
if (Array.isArray(notification)) {
21-
notification.forEach(notificationInstance => {
23+
notification.forEach((notificationInstance) => {
2224
this.addNotification(notificationInstance);
2325
});
2426
} else {
2527
this.addNotification(notification);
2628
}
27-
}
29+
},
2830
};
2931

3032
var NotificationsPlugin = {
3133
install(Vue) {
3234
Vue.mixin({
3335
data() {
3436
return {
35-
notificationStore: NotificationStore
37+
notificationStore: NotificationStore,
3638
};
3739
},
3840
methods: {
3941
notify(notification) {
4042
this.notificationStore.notify(notification);
41-
}
42-
}
43+
},
44+
},
4345
});
4446
Object.defineProperty(Vue.prototype, "$notify", {
4547
get() {
4648
return this.$root.notify;
47-
}
49+
},
4850
});
4951
Object.defineProperty(Vue.prototype, "$notifications", {
5052
get() {
5153
return this.$root.notificationStore;
52-
}
54+
},
5355
});
5456
Vue.component("Notifications", Notifications);
55-
}
57+
},
5658
};
5759

5860
export default NotificationsPlugin;

0 commit comments

Comments
 (0)