1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 10:18:38 +00:00

Add typescript guideline and typescript-specific eslint plugins and fix issues (#31521)

1. Add some general guidelines how to write our typescript code
2. Add `@typescript-eslint/eslint-plugin`, general typescript rules
3. Add `eslint-plugin-deprecation` to detect deprecated code
4. Fix all new lint issues that came up
This commit is contained in:
silverwind
2024-07-03 17:48:14 +02:00
committed by GitHub
parent b270b30aeb
commit 2c92c7c522
11 changed files with 253 additions and 178 deletions

View File

@@ -14,7 +14,7 @@ export async function login_user(browser, workerInfo, user) {
// Route to login page
// Note: this could probably be done more quickly with a POST
const response = await page.goto('/user/login');
await expect(response?.status()).toBe(200); // Status OK
expect(response?.status()).toBe(200); // Status OK
// Fill out form
await page.type('input[name=user_name]', user);
@@ -23,7 +23,7 @@ export async function login_user(browser, workerInfo, user) {
await page.waitForLoadState('networkidle'); // eslint-disable-line playwright/no-networkidle
await expect(page.url(), {message: `Failed to login user ${user}`}).toBe(`${workerInfo.project.use.baseURL}/`);
expect(page.url(), {message: `Failed to login user ${user}`}).toBe(`${workerInfo.project.use.baseURL}/`);
// Save state
await context.storageState({path: `${ARTIFACTS_PATH}/state-${user}-${workerInfo.workerIndex}.json`});