mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-01 20:59:45 +09:00
chore: update eslint, enable more rules and fix their findings (#39438)
Update eslint and its plugins, enable more rules and fix their findings: 1. `unicorn/no-unsafe-string-replacement` found that uploading a file whose name contains `$&` inserted a broken markdown link, because `String#replace` expands such patterns in the replacement string 2. `@typescript-eslint/require-await` removes `async` from functions that never await 3. Plugin rules not covered by a preset are now listed explicitly --------- Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
@@ -39,7 +39,7 @@ async function moveIssue({item, from, to, oldIndex}: SortableEvent): Promise<voi
|
||||
}
|
||||
}
|
||||
|
||||
async function initRepoProjectSortable(): Promise<void> {
|
||||
function initRepoProjectSortable(): void {
|
||||
// the HTML layout is: #project-board.board > .project-column .cards > .issue-card
|
||||
const mainBoard = document.querySelector<HTMLElement>('#project-board')!;
|
||||
let boardColumns = mainBoard.querySelectorAll<HTMLElement>('.project-column');
|
||||
@@ -182,7 +182,7 @@ export function initRepoProjectsView(): void {
|
||||
const writableProjectBoard = document.querySelector('#project-board[data-project-board-writable="true"]');
|
||||
if (!writableProjectBoard) return;
|
||||
|
||||
initRepoProjectSortable(); // no await
|
||||
initRepoProjectSortable();
|
||||
initRepoProjectColumnEdit(writableProjectBoard);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user