mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-03 14:20:43 +00: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:
@@ -40,11 +40,11 @@ test('execPseudoSelectorCommands', () => {
|
||||
expect(ret.targets).toEqual(Array.from(document.querySelectorAll('#d1 .x')));
|
||||
});
|
||||
|
||||
test('handleFetchActionSuccessJson', async () => {
|
||||
test('handleFetchActionSuccessJson', () => {
|
||||
const navigations = captureNavigations();
|
||||
await handleFetchActionSuccessJson(document.body, {redirect: '/'});
|
||||
await handleFetchActionSuccessJson(document.body, {redirect: ''});
|
||||
await handleFetchActionSuccessJson(document.body, {});
|
||||
handleFetchActionSuccessJson(document.body, {redirect: '/'});
|
||||
handleFetchActionSuccessJson(document.body, {redirect: ''});
|
||||
handleFetchActionSuccessJson(document.body, {});
|
||||
expect(navigations.map((n) => n.type)).toEqual(['push', 'reload', 'reload']);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user