apply eslint-disable max-len around block comments that need to have a long line

The `@api ` lines can't have a line break in them because it would
cause the first part of the text to not be displayed on the apidocs
website.

Using `// eslint-disable-line max-len` at the end of an `@api `
line doesn't work, possibly because it's nesting a comment inside
a multi-line comment.

The only way I've found to ignore the `max-len` rule is to put
disable and enable comments around the whole comment block.
This commit is contained in:
Alys
2020-02-08 16:06:00 +10:00
parent ac52da5be2
commit 15976e906a
2 changed files with 5 additions and 1 deletions

View File

@@ -111,6 +111,7 @@ api.getGroupTasks = {
}, },
}; };
/* eslint-disable max-len */
/** /**
* @api {post} /api/v3/group/:groupId/tasks/:taskId/move/to/:position Move group task to new position * @api {post} /api/v3/group/:groupId/tasks/:taskId/move/to/:position Move group task to new position
* @apiDescription Moves a group task to a specified position * @apiDescription Moves a group task to a specified position
@@ -124,6 +125,7 @@ api.getGroupTasks = {
* *
* @apiSuccess {Array} data The new tasks order (group.tasksOrder.{task.type}s) * @apiSuccess {Array} data The new tasks order (group.tasksOrder.{task.type}s)
*/ */
/* eslint-enable max-len */
api.groupMoveTask = { api.groupMoveTask = {
method: 'POST', method: 'POST',
url: '/group-tasks/:taskId/move/to/:position', url: '/group-tasks/:taskId/move/to/:position',

View File

@@ -1671,8 +1671,9 @@ api.togglePinnedItem = {
}, },
}; };
/* eslint-disable max-len */
/** /**
* @api {post} /api/v3/user/move-pinned-item/:type/:path/move/to/:position Move a pinned item in the rewards column to a new position after being sorted // eslint-disable-line max-len * @api {post} /api/v3/user/move-pinned-item/:type/:path/move/to/:position Move a pinned item in the rewards column to a new position after being sorted
* @apiName MovePinnedItem * @apiName MovePinnedItem
* @apiGroup User * @apiGroup User
* *
@@ -1689,6 +1690,7 @@ api.togglePinnedItem = {
* *
* @apiUse TaskNotFound * @apiUse TaskNotFound
*/ */
/* eslint-enable max-len */
api.movePinnedItem = { api.movePinnedItem = {
method: 'POST', method: 'POST',
url: '/user/move-pinned-item/:path/move/to/:position', url: '/user/move-pinned-item/:path/move/to/:position',