diff --git a/.eslintrc.js b/.eslintrc.js index 8c8cf57..6482350 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,6 +7,12 @@ module.exports = { rules: { "no-console": process.env.NODE_ENV === "production" ? "error" : "warn", "no-debugger": process.env.NODE_ENV === "production" ? "error" : "warn", + "max-len": [ + "error", + { + ignoreUrls: true, + }, + ], "prettier/prettier": [ "error", { diff --git a/src/api.js b/src/api.js index 4ede0ea..d17f160 100644 --- a/src/api.js +++ b/src/api.js @@ -55,7 +55,8 @@ export const getUsers = async () => { * Get all devices for the provided users. * * @param {Array.} users Array of usernames - * @returns {Object.>} Object mapping each username to an array of device names + * @returns {Object.>} + * Object mapping each username to an array of device names */ export const getDevices = async users => { const devices = {}; @@ -119,10 +120,12 @@ export const getUserDeviceLocationHistory = async ( /** * Get the location history of multiple devices. * - * @param {Object.>} devices Devices of which the history should be fetched + * @param {Object.>} devices + * Devices of which the history should be fetched * @param {String} start Start date and time in UTC * @param {String} end End date and time in UTC - * @returns {Object.>} Array of location history objects + * @returns {Object.>} + * Array of location history objects */ export const getLocationHistory = async (devices, start, end) => { const locationHistory = {}; @@ -145,7 +148,8 @@ export const getLocationHistory = async (devices, start, end) => { }; /** - * Connect to the WebSocket API, reconnect when necessary and handle received messages. + * Connect to the WebSocket API, reconnect when necessary and handle received + * messages. * * @param {webSocketLocationCallback} [callback] Callback for location messages */ diff --git a/src/components/LDeviceLocationPopup.vue b/src/components/LDeviceLocationPopup.vue index f36334b..4071769 100644 --- a/src/components/LDeviceLocationPopup.vue +++ b/src/components/LDeviceLocationPopup.vue @@ -126,7 +126,8 @@ export default { }, computed: { /** - * Return the face image as a data URI string which can be used for an image's src attribute. + * Return the face image as a data URI string which can be used for an + * image's src attribute. * * @returns {String} base64-encoded face image data URI */ @@ -134,7 +135,8 @@ export default { return `data:image/png;base64,${this.face}`; }, /** - * Return the device name for displaying with / as fallback. + * Return the device name for displaying with / as fallback. * * @returns {String} device name for displaying */ diff --git a/src/store/getters.js b/src/store/getters.js index 0bfaefb..380a1c4 100644 --- a/src/store/getters.js +++ b/src/store/getters.js @@ -12,7 +12,8 @@ import { distanceBetweenCoordinates } from "@/util"; * array of all coordinates. * * @param {State} state - * @param {MultiLocationHistory} state.locationHistory Location history of selected users and devices + * @param {MultiLocationHistory} state.locationHistory + * Location history of selected users and devices * @returns {Array.} All coordinates */ const locationHistoryLatLngs = state => { @@ -33,7 +34,8 @@ const locationHistoryLatLngs = state => { * coordinates does not exceed `config.map.maxPointDistance`. * * @param {State} state - * @param {MultiLocationHistory} state.locationHistory Location history of selected users and devices + * @param {MultiLocationHistory} state.locationHistory + * Location history of selected users and devices * @returns {Array.>} Groups of coherent coordinates */ const locationHistoryLatLngGroups = state => { diff --git a/src/types.js b/src/types.js index 7d91d3e..f479a5d 100644 --- a/src/types.js +++ b/src/types.js @@ -1,3 +1,5 @@ +/* eslint max-len: 0 */ + /** * A coordinate with latitude and longitude. *