Skip to content

Commit 616c2e7

Browse files
committed
chore: add semi rule to the linter and run --fix
Adds semicolon to the linter rules.
1 parent dfbd46c commit 616c2e7

25 files changed

+103
-102
lines changed

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ module.exports = {
1313
},
1414
rules: {
1515
"no-trailing-spaces": "error",
16-
"eol-last": "error"
16+
"eol-last": "error",
17+
semi: "error"
1718
}
18-
};
19+
}

src/js/Analytics.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,16 @@ const Analytics = function (trackingId, userId, appName, appVersion, changesetId
8787
Analytics.prototype.setDimension = function (dimension, value) {
8888
const dimensionName = `dimension${dimension}`;
8989
this._googleAnalytics.custom(dimensionName, value);
90-
}
90+
};
9191

9292
Analytics.prototype.setMetric = function (metric, value) {
9393
const metricName = `metric${metric}`;
9494
this._googleAnalytics.custom(metricName, value);
95-
}
95+
};
9696

9797
Analytics.prototype.sendEvent = function (category, action, options) {
9898
this._googleAnalytics.event(category, action, options);
99-
}
99+
};
100100

101101
Analytics.prototype.sendChangeEvents = function (category, changeList) {
102102
for (const actionName in changeList) {
@@ -107,23 +107,23 @@ Analytics.prototype.sendChangeEvents = function (category, changeList) {
107107
}
108108
}
109109
}
110-
}
110+
};
111111

112112
Analytics.prototype.sendAppView = function (viewName) {
113113
this._googleAnalytics.screenview(viewName);
114-
}
114+
};
115115

116116
Analytics.prototype.sendTiming = function (category, timing, value) {
117117
this._googleAnalytics.timing(category, timing, value);
118-
}
118+
};
119119

120120
Analytics.prototype.sendException = function (message) {
121121
this._googleAnalytics.exception(message);
122-
}
122+
};
123123

124124
Analytics.prototype.setOptOut = function (optOut) {
125125
window['ga-disable-' + this._trackingId] = !!optOut;
126-
}
126+
};
127127

128128
Analytics.prototype._rebuildFlightControllerEvent = function () {
129129
this.setDimension(this.DIMENSIONS.BOARD_TYPE, this._flightControllerData[this.DATA.BOARD_TYPE]);
@@ -137,36 +137,36 @@ Analytics.prototype._rebuildFlightControllerEvent = function () {
137137
this.setDimension(this.DIMENSIONS.BOARD_NAME, this._flightControllerData[this.DATA.BOARD_NAME]);
138138
this.setDimension(this.DIMENSIONS.MANUFACTURER_ID, this._flightControllerData[this.DATA.MANUFACTURER_ID]);
139139
this.setDimension(this.DIMENSIONS.MCU_TYPE, this._flightControllerData[this.DATA.MCU_TYPE]);
140-
}
140+
};
141141

142142
Analytics.prototype.setFlightControllerData = function (property, value) {
143143
this._flightControllerData[property] = value;
144144

145145
this._rebuildFlightControllerEvent();
146-
}
146+
};
147147

148148
Analytics.prototype.resetFlightControllerData = function () {
149149
this._flightControllerData = {};
150150

151151
this._rebuildFlightControllerEvent();
152-
}
152+
};
153153

154154
Analytics.prototype._rebuildFirmwareEvent = function () {
155155
this.setDimension(this.DIMENSIONS.FIRMWARE_NAME, this._firmwareData[this.DATA.FIRMWARE_NAME]);
156156
this.setDimension(this.DIMENSIONS.FIRMWARE_SOURCE, this._firmwareData[this.DATA.FIRMWARE_SOURCE]);
157157
this.setDimension(this.DIMENSIONS.FIRMWARE_ERASE_ALL, this._firmwareData[this.DATA.FIRMWARE_ERASE_ALL]);
158158
this.setDimension(this.DIMENSIONS.FIRMWARE_CHANNEL, this._firmwareData[this.DATA.FIRMWARE_CHANNEL]);
159159
this.setMetric(this.METRICS.FIRMWARE_SIZE, this._firmwareData[this.DATA.FIRMWARE_SIZE]);
160-
}
160+
};
161161

162162
Analytics.prototype.setFirmwareData = function (property, value) {
163163
this._firmwareData[property] = value;
164164

165165
this._rebuildFirmwareEvent();
166-
}
166+
};
167167

168168
Analytics.prototype.resetFirmwareData = function () {
169169
this._firmwareData = {};
170170

171171
this._rebuildFirmwareEvent();
172-
}
172+
};

src/js/ConfigInserter.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
const ConfigInserter = function () {
4-
}
4+
};
55

66
const CUSTOM_DEFAULTS_POINTER_ADDRESS = 0x08002800;
77
const BLOCK_SIZE = 16384;
@@ -102,4 +102,4 @@ ConfigInserter.prototype.insertConfig = function (firmware, input) {
102102
console.log(`Custom defaults inserted in: ${microtime() - timeParsingStart.toFixed(4)} seconds.`);
103103

104104
return true;
105-
}
105+
};

src/js/ConfigStorage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ const ConfigStorage = {
3838
window.localStorage.setItem(element, JSON.stringify(tmpObj));
3939
});
4040
}
41-
}
41+
};

src/js/Features.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Features.prototype.findFeatureByBit = function (bit) {
201201
return feature;
202202
}
203203
}
204-
}
204+
};
205205

206206
Features.prototype.updateData = function (featureElement) {
207207
const self = this;

src/js/TuningSliders.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ TuningSliders.updateFilterSlidersDisplay = function() {
273273
$('.tuningFilterSliders .sliderLabels tr:nth-child(2)').hide();
274274
this.sliderGyroFilter = true;
275275
} else {
276-
$('.tuningFilterSliders .sliderLabels tr:nth-child(2)').show()
276+
$('.tuningFilterSliders .sliderLabels tr:nth-child(2)').show();
277277
this.cachedGyroSliderValues = true;
278278
}
279279

src/js/backup_restore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ function configuration_restore(callback) {
436436
}
437437

438438
if (configuration.apiVersion == undefined) {
439-
configuration.apiVersion = "1.0.0" // a guess that will satisfy the rest of the code
439+
configuration.apiVersion = "1.0.0"; // a guess that will satisfy the rest of the code
440440
}
441441
// apiVersion previously stored without patchlevel
442442
if (!semver.parse(configuration.apiVersion)) {

src/js/gui.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ GuiControl.prototype.interval_add_condition = function (name, code, interval, fi
126126
this.interval_remove(name);
127127
}
128128
}, interval, first);
129-
}
129+
};
130130

131131
// name = string
132132
GuiControl.prototype.interval_remove = function (name) {

src/js/jenkins_loader.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const JenkinsLoader = function (url) {
77

88
this._jobsRequest = '/api/json?tree=jobs[name]';
99
this._buildsRequest = '/api/json?tree=builds[number,result,timestamp,artifacts[relativePath],changeSet[items[commitId,msg]]]';
10-
}
10+
};
1111

1212
JenkinsLoader.prototype.loadJobs = function (viewName, callback) {
1313
const self = this;
@@ -43,10 +43,10 @@ JenkinsLoader.prototype.loadJobs = function (viewName, callback) {
4343
// remove Betaflight prefix, rename Betaflight job to Development
4444
const jobs = jobsInfo.jobs.map(job => {
4545
return { title: job.name.replace('Betaflight ', '').replace('Betaflight', 'Development'), name: job.name };
46-
})
46+
});
4747

4848
// cache loaded info
49-
const object = {}
49+
const object = {};
5050
object[jobsDataTag] = jobs;
5151
object[cacheLastUpdateTag] = $.now();
5252
chrome.storage.local.set(object);
@@ -60,14 +60,14 @@ JenkinsLoader.prototype.loadJobs = function (viewName, callback) {
6060
cachedCallback();
6161
}
6262
});
63-
}
63+
};
6464

6565
JenkinsLoader.prototype.loadBuilds = function (jobName, callback) {
6666
const self = this;
6767

6868
const jobUrl = `${self._url}/job/${jobName}`;
6969
const buildsDataTag = `${jobUrl}BuildsData`;
70-
const cacheLastUpdateTag = `${jobUrl}BuildsLastUpdate`
70+
const cacheLastUpdateTag = `${jobUrl}BuildsLastUpdate`;
7171

7272
chrome.storage.local.get([cacheLastUpdateTag, buildsDataTag], function (result) {
7373
const buildsDataTimestamp = $.now();
@@ -98,7 +98,7 @@ JenkinsLoader.prototype.loadBuilds = function (jobName, callback) {
9898
}));
9999

100100
// cache loaded info
101-
const object = {}
101+
const object = {};
102102
object[buildsDataTag] = builds;
103103
object[cacheLastUpdateTag] = $.now();
104104
chrome.storage.local.set(object);
@@ -112,7 +112,7 @@ JenkinsLoader.prototype.loadBuilds = function (jobName, callback) {
112112
cachedCallback();
113113
}
114114
});
115-
}
115+
};
116116

117117
JenkinsLoader.prototype._parseBuilds = function (jobUrl, jobName, builds, callback) {
118118
// convert from `build -> targets` to `target -> builds` mapping
@@ -160,4 +160,4 @@ JenkinsLoader.prototype._parseBuilds = function (jobUrl, jobName, builds, callba
160160
});
161161

162162
callback(targetBuilds);
163-
}
163+
};

src/js/msp/MSPHelper.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
845845
const serialPort = {
846846
identifier: data.readU8(),
847847
scenario: data.readU8(),
848-
}
848+
};
849849
FC.SERIAL_CONFIG.ports.push(serialPort);
850850
}
851851
FC.SERIAL_CONFIG.mspBaudRate = data.readU32();
@@ -1658,7 +1658,7 @@ MspHelper.prototype.process_data = function(dataHandler) {
16581658
}
16591659
}
16601660
}
1661-
}
1661+
};
16621662

16631663
/**
16641664
* Encode the request body for the MSP request with the given code and return it as an array of bytes.
@@ -2330,7 +2330,7 @@ MspHelper.prototype.setRawRx = function(channels) {
23302330
}
23312331

23322332
MSP.send_message(MSPCodes.MSP_SET_RAW_RC, buffer, false);
2333-
}
2333+
};
23342334

23352335
/**
23362336
* Send a request to read a block of data from the dataflash at the given address and pass that address and a dataview
@@ -2568,7 +2568,7 @@ MspHelper.prototype.sendVoltageConfig = function(onCompleteCallback) {
25682568
MSP.send_message(MSPCodes.MSP_SET_VOLTAGE_METER_CONFIG, buffer, false, nextFunction);
25692569
}
25702570

2571-
}
2571+
};
25722572

25732573
MspHelper.prototype.sendCurrentConfig = function(onCompleteCallback) {
25742574

@@ -2598,7 +2598,7 @@ MspHelper.prototype.sendCurrentConfig = function(onCompleteCallback) {
25982598
MSP.send_message(MSPCodes.MSP_SET_CURRENT_METER_CONFIG, buffer, false, nextFunction);
25992599
}
26002600

2601-
}
2601+
};
26022602

26032603
MspHelper.prototype.sendLedStripConfig = function(onCompleteCallback) {
26042604

@@ -2688,7 +2688,7 @@ MspHelper.prototype.sendLedStripConfig = function(onCompleteCallback) {
26882688

26892689
MSP.send_message(MSPCodes.MSP_SET_LED_STRIP_CONFIG, buffer, false, nextFunction);
26902690
}
2691-
}
2691+
};
26922692

26932693
MspHelper.prototype.sendLedStripColors = function(onCompleteCallback) {
26942694
if (FC.LED_COLORS.length == 0) {
@@ -2703,7 +2703,7 @@ MspHelper.prototype.sendLedStripColors = function(onCompleteCallback) {
27032703
}
27042704
MSP.send_message(MSPCodes.MSP_SET_LED_COLORS, buffer, false, onCompleteCallback);
27052705
}
2706-
}
2706+
};
27072707

27082708
MspHelper.prototype.sendLedStripModeColors = function(onCompleteCallback) {
27092709

@@ -2733,7 +2733,7 @@ MspHelper.prototype.sendLedStripModeColors = function(onCompleteCallback) {
27332733

27342734
MSP.send_message(MSPCodes.MSP_SET_LED_STRIP_MODECOLOR, buffer, false, nextFunction);
27352735
}
2736-
}
2736+
};
27372737

27382738
MspHelper.prototype.serialPortFunctionMaskToFunctions = function(functionMask) {
27392739
const self = this;
@@ -2747,7 +2747,7 @@ MspHelper.prototype.serialPortFunctionMaskToFunctions = function(functionMask) {
27472747
}
27482748
}
27492749
return functions;
2750-
}
2750+
};
27512751

27522752
MspHelper.prototype.serialPortFunctionsToMask = function(functions) {
27532753
const self = this;
@@ -2761,7 +2761,7 @@ MspHelper.prototype.serialPortFunctionsToMask = function(functions) {
27612761
}
27622762
}
27632763
return mask;
2764-
}
2764+
};
27652765

27662766
MspHelper.prototype.sendRxFailConfig = function(onCompleteCallback) {
27672767
let nextFunction = send_next_rxfail_config;
@@ -2792,7 +2792,7 @@ MspHelper.prototype.sendRxFailConfig = function(onCompleteCallback) {
27922792
}
27932793
MSP.send_message(MSPCodes.MSP_SET_RXFAIL_CONFIG, buffer, false, nextFunction);
27942794
}
2795-
}
2795+
};
27962796

27972797
MspHelper.prototype.setArmingEnabled = function(doEnable, disableRunawayTakeoffPrevention, onCompleteCallback) {
27982798
if (semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_37)
@@ -2822,7 +2822,7 @@ MspHelper.prototype.setArmingEnabled = function(doEnable, disableRunawayTakeoffP
28222822
onCompleteCallback();
28232823
}
28242824
}
2825-
}
2825+
};
28262826

28272827
MspHelper.prototype.loadSerialConfig = function(callback) {
28282828
const mspCode = semver.gte(FC.CONFIG.apiVersion, API_VERSION_1_43) ? MSPCodes.MSP2_COMMON_SERIAL_CONFIG : MSPCodes.MSP_CF_SERIAL_CONFIG;

0 commit comments

Comments
 (0)