Skip to content

Commit f2b0d2b

Browse files
committed
linting
1 parent 2772ed0 commit f2b0d2b

File tree

64 files changed

+482
-480
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+482
-480
lines changed

src/App.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default {
7979
async saveValues(topicsToSave = undefined) {
8080
function sleep(milliseconds) {
8181
return new Promise((resolve) =>
82-
setTimeout(resolve, milliseconds)
82+
setTimeout(resolve, milliseconds),
8383
);
8484
}
8585
@@ -136,7 +136,7 @@ export default {
136136
this.doPublish(
137137
"openWB/set/command/" + this.client.options.clientId + "/todo",
138138
event,
139-
false
139+
false,
140140
);
141141
},
142142
/**
@@ -162,7 +162,7 @@ export default {
162162
this.client.on("connect", () => {
163163
console.debug(
164164
"Connection succeeded! ClientId: ",
165-
this.client.options.clientId
165+
this.client.options.clientId,
166166
);
167167
this.doSubscribe(["openWB/system/usage_terms_acknowledged"]); // required for route guard
168168
});
@@ -180,7 +180,7 @@ export default {
180180
} catch (error) {
181181
console.debug(
182182
"Json parsing failed, fallback to string: ",
183-
topic
183+
topic,
184184
);
185185
myPayload = message.toString();
186186
}
@@ -221,7 +221,7 @@ export default {
221221
if (error) {
222222
console.error("Publish error", error);
223223
}
224-
}
224+
},
225225
);
226226
},
227227
postClientMessage(message, type = "secondary") {

src/components/OpenwbBaseArrayInput.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ library.add(
9393
fasTag,
9494
fasTimesCircle,
9595
fasPlus,
96-
fasInfoCircle
96+
fasInfoCircle,
9797
);
9898
9999
export default {

src/components/OpenwbBaseCopyToClipboard.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ export default {
4545
},
4646
() => {
4747
console.error("copy to clipboard failed");
48-
}
48+
},
4949
);
5050
} else {
5151
console.debug(
52-
"clipboard api not supported/enabled, fallback to select"
52+
"clipboard api not supported/enabled, fallback to select",
5353
);
5454
if (window.getSelection) {
5555
console.debug("using 'window.getSelection'");

src/components/OpenwbBaseModalDialog.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default {
8282
validator: function (value) {
8383
return (
8484
["around", "between", "center", "end", "start"].indexOf(
85-
value
85+
value,
8686
) !== -1
8787
);
8888
},

src/components/OpenwbBaseNumberInput.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ export default {
7676
if (this.precision !== undefined) {
7777
return parseFloat(
7878
Math.round(
79-
this.modelValue * Math.pow(10, this.precision)
80-
) / Math.pow(10, this.precision)
79+
this.modelValue * Math.pow(10, this.precision),
80+
) / Math.pow(10, this.precision),
8181
);
8282
}
8383
return this.modelValue;

src/components/OpenwbBaseRangeInput.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ library.add(
6666
fasQuestionCircle,
6767
farQuestionCircle,
6868
fasStepForward,
69-
fasStepBackward
69+
fasStepBackward,
7070
);
7171
7272
export default {
@@ -138,7 +138,7 @@ export default {
138138
"sliderValue: not found in values: ",
139139
this.modelValue,
140140
"using min as default: ",
141-
this.min
141+
this.min,
142142
);
143143
return this.min;
144144
} else {
@@ -164,7 +164,7 @@ export default {
164164
increment() {
165165
var newSliderValue = Math.min(
166166
this.sliderValue + this.step,
167-
this.max
167+
this.max,
168168
);
169169
// rounding needed!
170170
this.sliderValue =
@@ -174,7 +174,7 @@ export default {
174174
decrement() {
175175
var newSliderValue = Math.max(
176176
this.sliderValue - this.step,
177-
this.min
177+
this.min,
178178
);
179179
// rounding needed!
180180
this.sliderValue =

src/components/OpenwbBaseTextInput.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ library.add(
238238
fasClock,
239239
fasCalendarDay,
240240
farEye,
241-
farEyeSlash
241+
farEyeSlash,
242242
);
243243
244244
export default {
@@ -306,7 +306,7 @@ export default {
306306
console.error("parsing JSON failed: " + newValue);
307307
this.inputInvalid = true;
308308
this.$refs.jsonInput.setCustomValidity(
309-
"Ungültiger JSON Ausdruck!"
309+
"Ungültiger JSON Ausdruck!",
310310
);
311311
this.tempValue = newValue;
312312
}
@@ -375,7 +375,7 @@ export default {
375375
break;
376376
default:
377377
console.warn(
378-
`cannot modify input of subtype '${this.subtype}'`
378+
`cannot modify input of subtype '${this.subtype}'`,
379379
);
380380
return;
381381
}

src/components/OpenwbBaseTextarea.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export default {
112112
console.warn("parsing JSON failed: " + newValue);
113113
this.inputInvalid = true;
114114
this.$refs.jsonInput.setCustomValidity(
115-
"Ungültiger JSON Ausdruck!"
115+
"Ungültiger JSON Ausdruck!",
116116
);
117117
this.tempValue = newValue;
118118
}

src/components/OpenwbBaseToast.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default {
7777
if (Math.abs(elapsed) > units[unit]) {
7878
this.relativeTime = rtf.format(
7979
Math.round(-elapsed / units[unit]), // negative time diff!
80-
unit
80+
unit,
8181
);
8282
break;
8383
}

src/components/OpenwbNestedList.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ library.add(
5858
fasChargingStation,
5959
fasCarBattery,
6060
fasSolarPanel,
61-
fasGaugeHigh
61+
fasGaugeHigh,
6262
);
6363
6464
export default {

src/components/OpenwbPageMessages.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ export default {
9191
if (
9292
(total == "light" &&
9393
["info", "success", "warning", "danger"].includes(
94-
currentMessage.type
94+
currentMessage.type,
9595
)) ||
9696
(total == "info" &&
9797
["success", "warning", "danger"].includes(
98-
currentMessage.type
98+
currentMessage.type,
9999
)) ||
100100
(total == "success" &&
101101
["warning", "danger"].includes(currentMessage.type)) ||
@@ -157,7 +157,7 @@ export default {
157157
},
158158
systemMessages() {
159159
let messageTopics = this.getWildcardTopics(
160-
"openWB/system/messages/+"
160+
"openWB/system/messages/+",
161161
);
162162
var messageList = [];
163163
for (const [key, element] of Object.entries(messageTopics)) {
@@ -167,7 +167,7 @@ export default {
167167
},
168168
clientMessages() {
169169
let messageTopics = this.getWildcardTopics(
170-
"openWB/command/" + this.$root.mqttClientId + "/messages/+"
170+
"openWB/command/" + this.$root.mqttClientId + "/messages/+",
171171
);
172172
var messageList = [];
173173
for (const [key, element] of Object.entries(messageTopics)) {
@@ -192,7 +192,7 @@ export default {
192192
*/
193193
dismissError() {
194194
this.clearTopic(
195-
"openWB/command/" + this.$root.mqttClientId + "/error"
195+
"openWB/command/" + this.$root.mqttClientId + "/error",
196196
);
197197
},
198198
/**

src/components/__tests__/OpenwbBaseArrayInput.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, it, expect } from "vitest";
22
import { shallowMount } from "@vue/test-utils";
33
import OpenwbBaseArrayInput from "../OpenwbBaseArrayInput.vue";
44

5-
describe("OpenwbBaseNumberInput.vue", () => {
5+
describe("OpenwbBaseArrayInput.vue", () => {
66
// check title prop
77
it("render title", () => {
88
const title = "Array Input Test";
@@ -36,7 +36,7 @@ describe("OpenwbBaseNumberInput.vue", () => {
3636
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
3737
await titleLabel.trigger("click");
3838
expect(wrapper.find("span.alert.alert-info").html()).toContain(
39-
helpContent
39+
helpContent,
4040
);
4141
});
4242
// check initial value
@@ -57,7 +57,7 @@ describe("OpenwbBaseNumberInput.vue", () => {
5757
const renderedTextInput = wrapper.find("input[type=text]");
5858
await renderedTextInput.setValue(newTag);
5959
const renderedAddButton = wrapper.find(
60-
".input-group-append font-awesome-icon-stub"
60+
".input-group-append font-awesome-icon-stub",
6161
);
6262
await renderedAddButton.trigger("click");
6363
expect(wrapper.emitted("update:modelValue")[0]).toStrictEqual([

src/components/__tests__/OpenwbBaseButtonGroupInput.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("OpenwbBaseButtonGroupInput.vue", () => {
3636
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
3737
await titleLabel.trigger("click");
3838
expect(wrapper.find("span.alert.alert-info").html()).toContain(
39-
helpContent
39+
helpContent,
4040
);
4141
});
4242
// check buttons

src/components/__tests__/OpenwbBaseCheckboxInput.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe("OpenwbBaseCheckboxInput.vue", () => {
3636
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
3737
await titleLabel.trigger("click");
3838
expect(wrapper.find("span.alert.alert-info").html()).toContain(
39-
helpContent
39+
helpContent,
4040
);
4141
});
4242
// check buttons

src/components/__tests__/OpenwbBaseNumberInput.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe("OpenwbBaseNumberInput.vue", () => {
4545
expect(wrapper.find("span.alert.alert-info").exists()).toBe(false);
4646
await titleLabel.trigger("click");
4747
expect(wrapper.find("span.alert.alert-info").html()).toContain(
48-
helpContent
48+
helpContent,
4949
);
5050
});
5151
// check initial value

src/components/__tests__/OpenwbBaseRangeInput.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe("OpenwbBaseRangeInput.vue", () => {
4646
expect(wrapper.find("div.alert.alert-info").exists()).toBe(false);
4747
await titleLabel.trigger("click");
4848
expect(wrapper.find("div.alert.alert-info").html()).toContain(
49-
helpContent
49+
helpContent,
5050
);
5151
});
5252
// check initial value

src/components/charge_points/OpenwbChargePointProxy.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default {
3838
computed: {
3939
myChargePointSettingsComponent() {
4040
console.debug(
41-
`loading charge point settings: ${this.chargePointType}`
41+
`loading charge point settings: ${this.chargePointType}`,
4242
);
4343
return defineAsyncComponent({
4444
loader: () =>
@@ -48,7 +48,7 @@ export default {
4848
},
4949
myChargePointCommandsComponent() {
5050
console.debug(
51-
`loading charge point commands: ${this.chargePointType}`
51+
`loading charge point commands: ${this.chargePointType}`,
5252
);
5353
return defineAsyncComponent({
5454
loader: () => import(`./${this.chargePointType}/commands.vue`),

src/components/charge_points/openwb_pro/commands.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
formData.append("command", "update");
2929
formData.append(
3030
"data",
31-
'{"ip_address":"' + this.configuration.ip_address + '"}'
31+
'{"ip_address":"' + this.configuration.ip_address + '"}',
3232
);
3333
const startedMessage =
3434
"Die Aktualisierung der openWB Pro wird gestartet...";
@@ -41,7 +41,7 @@ export default {
4141
location.host +
4242
"/openWB/web/settings/modules/charge_points/openwb_pro/commands.php",
4343
formData,
44-
{ timeout: 5000 }
44+
{ timeout: 5000 },
4545
)
4646
.then(() => {
4747
const successMessage =
@@ -55,7 +55,7 @@ export default {
5555
// that falls out of the range of 2xx
5656
console.error(
5757
error.response.status,
58-
error.response.data
58+
error.response.data,
5959
);
6060
alertMessage +=
6161
error.response.status + ": " + error.response.data;

src/components/devices/OpenwbConfigProxy.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default {
2727
computed: {
2828
myComponent() {
2929
console.debug(
30-
`loading component: ${this.deviceType} / ${this.componentType}`
30+
`loading component: ${this.deviceType} / ${this.componentType}`,
3131
);
3232
if (this.componentType !== undefined) {
3333
return defineAsyncComponent({

src/components/devices/virtual/counter.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@update:model-value="
1515
updateConfiguration(
1616
$event * 1000,
17-
'configuration.external_consumption'
17+
'configuration.external_consumption',
1818
)
1919
"
2020
>

0 commit comments

Comments
 (0)