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:
silverwindandbircni authored and GitHub committed 2026-09-26 07:20:39 +00:00
1 parent a15f032026
commit 857d3d3df3
35 files changed
+299 -197

No files matched your search

+4 -4
View File
@@ -1,21 +1,21 @@
import {showSuccessToast, showInfoToast, showErrorToast, showWarningToast} from './toast.ts';
test('showSuccessToast', async () => {
test('showSuccessToast', () => {
showSuccessToast('success', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});
test('showInfoToast', async () => {
test('showInfoToast', () => {
showInfoToast('info', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});
test('showWarningToast', async () => {
test('showWarningToast', () => {
showWarningToast('warning', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});
test('showErrorToast', async () => {
test('showErrorToast', () => {
showErrorToast('error', {duration: -1});
expect(document.querySelector('.toastify')).toBeTruthy();
});