diff options
Diffstat (limited to 'src/helpers')
-rw-r--r-- | src/helpers/array-helpers.js | 6 | ||||
-rw-r--r-- | src/helpers/async-helpers.js | 2 | ||||
-rw-r--r-- | src/helpers/service-helpers.js | 2 | ||||
-rw-r--r-- | src/helpers/validation-helpers.js | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/helpers/array-helpers.js b/src/helpers/array-helpers.js index ffb3b63dc..5e592b7f7 100644 --- a/src/helpers/array-helpers.js +++ b/src/helpers/array-helpers.js | |||
@@ -1,4 +1,4 @@ | |||
1 | export const shuffleArray = arr => arr | 1 | export const shuffleArray = (arr) => arr |
2 | .map(a => [Math.random(), a]) | 2 | .map((a) => [Math.random(), a]) |
3 | .sort((a, b) => a[0] - b[0]) | 3 | .sort((a, b) => a[0] - b[0]) |
4 | .map(a => a[1]); | 4 | .map((a) => a[1]); |
diff --git a/src/helpers/async-helpers.js b/src/helpers/async-helpers.js index 2ef01ee09..c6c57e28e 100644 --- a/src/helpers/async-helpers.js +++ b/src/helpers/async-helpers.js | |||
@@ -1,5 +1,5 @@ | |||
1 | /* eslint-disable import/prefer-default-export */ | 1 | /* eslint-disable import/prefer-default-export */ |
2 | 2 | ||
3 | export function sleep(ms = 0) { | 3 | export function sleep(ms = 0) { |
4 | return new Promise(r => setTimeout(r, ms)); | 4 | return new Promise((r) => setTimeout(r, ms)); |
5 | } | 5 | } |
diff --git a/src/helpers/service-helpers.js b/src/helpers/service-helpers.js index f6363aca8..28d483182 100644 --- a/src/helpers/service-helpers.js +++ b/src/helpers/service-helpers.js | |||
@@ -14,5 +14,5 @@ export function removeServicePartitionDirectory(id = '', addServicePrefix = fals | |||
14 | 14 | ||
15 | export async function getServiceIdsFromPartitions() { | 15 | export async function getServiceIdsFromPartitions() { |
16 | const files = await fs.readdir(getServicePartitionsDirectory()); | 16 | const files = await fs.readdir(getServicePartitionsDirectory()); |
17 | return files.filter(n => n !== '__chrome_extension'); | 17 | return files.filter((n) => n !== '__chrome_extension'); |
18 | } | 18 | } |
diff --git a/src/helpers/validation-helpers.js b/src/helpers/validation-helpers.js index f489ec65e..116f19905 100644 --- a/src/helpers/validation-helpers.js +++ b/src/helpers/validation-helpers.js | |||
@@ -61,7 +61,7 @@ export function minLength(length) { | |||
61 | 61 | ||
62 | export function oneRequired(targets) { | 62 | export function oneRequired(targets) { |
63 | return ({ field, form }) => { | 63 | return ({ field, form }) => { |
64 | const invalidFields = targets.filter(target => form.$(target).value === ''); | 64 | const invalidFields = targets.filter((target) => form.$(target).value === ''); |
65 | return [targets.length !== invalidFields.length, window.ferdi.intl.formatMessage(messages.required, { field: field.label })]; | 65 | return [targets.length !== invalidFields.length, window.ferdi.intl.formatMessage(messages.required, { field: field.label })]; |
66 | }; | 66 | }; |
67 | } | 67 | } |