2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-27 09:10:51 +00:00

[PUI] Switch linting to biome (#8317)

* bump pre-commit

* add biome

* autofixes

* use number functions

* fix string usage

* use specific variable definition

* fix missing translations

* reduce alerts

* add missing keys

* fix index creation

* fix more strings

* fix types

* fix function

* add missing keys

* fiy array access

* fix string functions

* do not redefine var

* extend exlcusions

* reduce unnecessary operators

* simplify request

* use number functions

* fix missing translation

* add missing type

* fix filter

* use newer func

* remove unused fragment

* fix confusing assigment

* pass children as elements

* add missing translation

* fix imports

* fix import

* auto-fix problems

* add autfix for unused imports

* fix SAST error

* fix useSelfClosingElements

* fix useTemplate

* add codespell exception

* Update pui_printing.spec.ts

* Update pui_printing.spec.ts

* add vscode defaults
This commit is contained in:
Matthias Mair
2024-11-12 01:03:08 +01:00
committed by GitHub
parent e7cfb4c3c0
commit 0872beaba9
308 changed files with 2635 additions and 2550 deletions

View File

@ -108,7 +108,7 @@ test('Pages - Build Order - Build Outputs', async ({ page }) => {
let sn = 1;
if (!!placeholder && placeholder.includes('Next serial number')) {
sn = parseInt(placeholder.split(':')[1].trim());
sn = Number.parseInt(placeholder.split(':')[1].trim());
}
// Generate some new serial numbers
@ -234,11 +234,11 @@ test('Pages - Build Order - Allocation', async ({ page }) => {
// Check for expected rows
for (let idx = 0; idx < data.length; idx++) {
let item = data[idx];
const item = data[idx];
let cell = await page.getByRole('cell', { name: item.name });
let row = await cell.locator('xpath=ancestor::tr').first();
let progress = `${item.allocated} / ${item.required}`;
const cell = await page.getByRole('cell', { name: item.name });
const row = await cell.locator('xpath=ancestor::tr').first();
const progress = `${item.allocated} / ${item.required}`;
await row.getByRole('cell', { name: item.ipn }).first().waitFor();
await row.getByRole('cell', { name: item.available }).first().waitFor();
@ -246,8 +246,8 @@ test('Pages - Build Order - Allocation', async ({ page }) => {
}
// Check for expected buttons on Red Widget
let redWidget = await page.getByRole('cell', { name: 'Red Widget' });
let redRow = await redWidget.locator('xpath=ancestor::tr').first();
const redWidget = await page.getByRole('cell', { name: 'Red Widget' });
const redRow = await redWidget.locator('xpath=ancestor::tr').first();
await redRow.getByLabel(/row-action-menu-/i).click();
await page