Enable ESLint max-len rule

This commit is contained in:
Linus Groh
2020-01-26 00:49:15 +00:00
parent cfa3052a0a
commit 95613753a9
5 changed files with 24 additions and 8 deletions
+6
View File
@@ -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",
{
+8 -4
View File
@@ -55,7 +55,8 @@ export const getUsers = async () => {
* Get all devices for the provided users.
*
* @param {Array.<User>} users Array of usernames
* @returns {Object.<User, Array.<Device>>} Object mapping each username to an array of device names
* @returns {Object.<User, Array.<Device>>}
* 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.<User, Array.<Device>>} devices Devices of which the history should be fetched
* @param {Object.<User, Array.<Device>>} 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.<User, Object.<Device, LocationHistory>>} Array of location history objects
* @returns {Object.<User, Object.<Device, LocationHistory>>}
* 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
*/
+4 -2
View File
@@ -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 <user identifier>/<device identifier> as fallback.
* Return the device name for displaying with <user identifier>/<device
* identifier> as fallback.
*
* @returns {String} device name for displaying
*/
+4 -2
View File
@@ -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.<L.LatLng>} 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.<Array.<L.LatLng>>} Groups of coherent coordinates
*/
const locationHistoryLatLngGroups = state => {
+2
View File
@@ -1,3 +1,5 @@
/* eslint max-len: 0 */
/**
* A coordinate with latitude and longitude.
*