diff --git a/Makefile b/Makefile
index 47516079..929d3dc1 100644
--- a/Makefile
+++ b/Makefile
@@ -149,7 +149,7 @@ sass:
node-sass lib/gui/app/scss/main.scss > lib/gui/css/main.css
lint-ts:
- resin-lint --fix --typescript typings lib tests scripts/clean-shrinkwrap.ts webpack.config.ts
+ balena-lint --fix --typescript typings lib tests scripts/clean-shrinkwrap.ts webpack.config.ts
lint-sass:
sass-lint -v lib/gui/app/scss/**/*.scss lib/gui/app/scss/*.scss
diff --git a/lib/gui/app/app.ts b/lib/gui/app/app.ts
index 865a22fb..da9cff55 100644
--- a/lib/gui/app/app.ts
+++ b/lib/gui/app/app.ts
@@ -198,7 +198,7 @@ function prepareDrive(drive: Drive) {
// @ts-ignore
drive.progress = 0;
drive.disabled = true;
- drive.on('progress', progress => {
+ drive.on('progress', (progress) => {
updateDriveProgress(drive, progress);
});
return drive;
@@ -275,7 +275,7 @@ function updateDriveProgress(
driveScanner.on('attach', addDrive);
driveScanner.on('detach', removeDrive);
-driveScanner.on('error', error => {
+driveScanner.on('error', (error) => {
// Stop the drive scanning loop in case of errors,
// otherwise we risk presenting the same error over
// and over again to the user, while also heavily
@@ -289,7 +289,7 @@ driveScanner.start();
let popupExists = false;
-window.addEventListener('beforeunload', async event => {
+window.addEventListener('beforeunload', async (event) => {
if (!flashState.isFlashing() || popupExists) {
analytics.logEvent('Close application', {
isFlashing: flashState.isFlashing(),
diff --git a/lib/gui/app/components/drive-selector/DriveSelectorModal.tsx b/lib/gui/app/components/drive-selector/DriveSelectorModal.tsx
index c93f3f68..136e0e31 100644
--- a/lib/gui/app/components/drive-selector/DriveSelectorModal.tsx
+++ b/lib/gui/app/components/drive-selector/DriveSelectorModal.tsx
@@ -190,7 +190,7 @@ export function DriveSelectorModal({ close }: { close: () => void }) {
keyboardToggleDrive(drive, evt)}
+ onKeyPress={(evt) => keyboardToggleDrive(drive, evt)}
>
{drive.description}
diff --git a/lib/gui/app/components/drive-selector/target-selector.tsx b/lib/gui/app/components/drive-selector/target-selector.tsx
index f9dd930b..ea2fe8db 100644
--- a/lib/gui/app/components/drive-selector/target-selector.tsx
+++ b/lib/gui/app/components/drive-selector/target-selector.tsx
@@ -34,7 +34,7 @@ import {
} from '../../styled-components';
import { middleEllipsis } from '../../utils/middle-ellipsis';
-const TargetDetail = styled(props => )`
+const TargetDetail = styled((props) => )`
float: ${({ float }) => float};
`;
diff --git a/lib/gui/app/components/finish/finish.tsx b/lib/gui/app/components/finish/finish.tsx
index dc1cb194..fe4ecf79 100644
--- a/lib/gui/app/components/finish/finish.tsx
+++ b/lib/gui/app/components/finish/finish.tsx
@@ -58,7 +58,7 @@ const restart = (options: any, goToMain: () => void) => {
const formattedErrors = () => {
const errors = _.map(
_.get(flashState.getFlashResults(), ['results', 'errors']),
- error => {
+ (error) => {
return `${error.device}: ${error.message || error.code}`;
},
);
diff --git a/lib/gui/app/components/source-selector/source-selector.tsx b/lib/gui/app/components/source-selector/source-selector.tsx
index f8c60d10..fb0c9887 100644
--- a/lib/gui/app/components/source-selector/source-selector.tsx
+++ b/lib/gui/app/components/source-selector/source-selector.tsx
@@ -148,7 +148,7 @@ const URLSelector = ({ done }: { done: (imageURL: string) => void }) => {
Recent
(
+ rows={_.map(recentImages, (recent) => (
{
diff --git a/lib/gui/app/components/svg-icon/svg-icon.tsx b/lib/gui/app/components/svg-icon/svg-icon.tsx
index 61efcebe..200e65df 100644
--- a/lib/gui/app/components/svg-icon/svg-icon.tsx
+++ b/lib/gui/app/components/svg-icon/svg-icon.tsx
@@ -82,7 +82,7 @@ export class SVGIcon extends React.Component {
let svgData = '';
- _.find(this.props.contents, content => {
+ _.find(this.props.contents, (content) => {
const attempt = tryParseSVGContents(content);
if (attempt) {
@@ -94,7 +94,7 @@ export class SVGIcon extends React.Component {
});
if (!svgData) {
- _.find(this.props.paths, relativePath => {
+ _.find(this.props.paths, (relativePath) => {
// This means the path to the icon should be
// relative to *this directory*.
// TODO: There might be a way to compute the path
diff --git a/lib/gui/app/models/flash-state.ts b/lib/gui/app/models/flash-state.ts
index 079eb0df..3894ce6d 100644
--- a/lib/gui/app/models/flash-state.ts
+++ b/lib/gui/app/models/flash-state.ts
@@ -100,10 +100,7 @@ export function getFlashResults() {
}
export function getFlashState() {
- return store
- .getState()
- .get('flashState')
- .toJS();
+ return store.getState().get('flashState').toJS();
}
export function wasLastFlashCancelled() {
diff --git a/lib/gui/app/models/leds.ts b/lib/gui/app/models/leds.ts
index 85363138..71747abc 100644
--- a/lib/gui/app/models/leds.ts
+++ b/lib/gui/app/models/leds.ts
@@ -81,7 +81,7 @@ export function init() {
for (const [drivePath, ledsNames] of Object.entries(ledsMapping)) {
leds.set('/dev/disk/by-path/' + drivePath, new RGBLed(ledsNames));
}
- observe(state => {
+ observe((state) => {
const availableDrives = state
.get('availableDrives')
.toJS()
diff --git a/lib/gui/app/models/selection-state.ts b/lib/gui/app/models/selection-state.ts
index caf53b09..6a19f73a 100644
--- a/lib/gui/app/models/selection-state.ts
+++ b/lib/gui/app/models/selection-state.ts
@@ -51,10 +51,7 @@ export function selectImage(image: any) {
* @summary Get all selected drives' devices
*/
export function getSelectedDevices(): string[] {
- return store
- .getState()
- .getIn(['selection', 'devices'])
- .toJS();
+ return store.getState().getIn(['selection', 'devices']).toJS();
}
/**
@@ -62,7 +59,7 @@ export function getSelectedDevices(): string[] {
*/
export function getSelectedDrives(): any[] {
const drives = availableDrives.getDrives();
- return _.map(getSelectedDevices(), device => {
+ return _.map(getSelectedDevices(), (device) => {
return _.find(drives, { device });
});
}
diff --git a/lib/gui/app/models/store.ts b/lib/gui/app/models/store.ts
index 8da31f22..b9789a2c 100644
--- a/lib/gui/app/models/store.ts
+++ b/lib/gui/app/models/store.ts
@@ -34,7 +34,7 @@ function verifyNoNilFields(
fields: string[],
name: string,
) {
- const nilFields = _.filter(fields, field => {
+ const nilFields = _.filter(fields, (field) => {
return _.isNil(_.get(object, field));
});
if (nilFields.length) {
@@ -133,9 +133,9 @@ function storeReducer(
drives = _.sortBy(drives, [
// Devices with no devicePath first (usbboot)
- d => !!d.devicePath,
+ (d) => !!d.devicePath,
// Then sort by devicePath (only available on Linux with udev) or device
- d => d.devicePath || d.device,
+ (d) => d.devicePath || d.device,
]);
const newState = state.set('availableDrives', Immutable.fromJS(drives));
diff --git a/lib/gui/app/modules/image-writer.ts b/lib/gui/app/modules/image-writer.ts
index 3b7b2690..202c5a3b 100644
--- a/lib/gui/app/modules/image-writer.ts
+++ b/lib/gui/app/modules/image-writer.ts
@@ -149,13 +149,13 @@ export function performWrite(
let cancelled = false;
ipc.serve();
return new Promise((resolve, reject) => {
- ipc.server.on('error', error => {
+ ipc.server.on('error', (error) => {
terminateServer();
const errorObject = errors.fromJSON(error);
reject(errorObject);
});
- ipc.server.on('log', message => {
+ ipc.server.on('log', (message) => {
console.log(message);
});
@@ -174,8 +174,8 @@ export function performWrite(
handleErrorLogging(error, analyticsData);
});
- ipc.server.on('done', event => {
- event.results.errors = _.map(event.results.errors, data => {
+ ipc.server.on('done', (event) => {
+ event.results.errors = _.map(event.results.errors, (data) => {
return errors.fromJSON(data);
});
_.merge(flashResults, event);
diff --git a/lib/gui/app/modules/update-lock.ts b/lib/gui/app/modules/update-lock.ts
index 978e9c43..51a2b989 100644
--- a/lib/gui/app/modules/update-lock.ts
+++ b/lib/gui/app/modules/update-lock.ts
@@ -147,7 +147,7 @@ class UpdateLock extends EventEmitter {
logException(checkError);
}
if (!isLocked) {
- UpdateLock.acquire(error => {
+ UpdateLock.acquire((error) => {
if (error) {
logException(error);
}
diff --git a/lib/gui/app/os/windows-network-drives.ts b/lib/gui/app/os/windows-network-drives.ts
index 6fffb515..1acba6a7 100755
--- a/lib/gui/app/os/windows-network-drives.ts
+++ b/lib/gui/app/os/windows-network-drives.ts
@@ -88,7 +88,7 @@ async function getWindowsNetworkDrives(): Promise