ci: Setup biome and pre-commit hooks for formatting (no-changelog) (#10795)

Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-17 14:10:22 +02:00
committed by GitHub
parent 57836cc17a
commit 6a35812f92
85 changed files with 701 additions and 465 deletions

7
cypress/biome.jsonc Normal file
View File

@@ -0,0 +1,7 @@
{
"$schema": "../node_modules/@biomejs/biome/configuration_schema.json",
"extends": ["../biome.jsonc"],
"formatter": {
"ignore": ["fixtures/**"]
}
}

View File

@@ -227,7 +227,7 @@ describe('NDV', () => {
workflowPage.actions.zoomToFit();
/* prettier-ignore */
// biome-ignore format:
const PINNED_DATA = [
{
"id": "abc",
@@ -263,7 +263,6 @@ describe('NDV', () => {
]
}
];
/* prettier-ignore */
workflowPage.actions.openNode('Get thread details1');
ndv.actions.pastePinnedData(PINNED_DATA);
ndv.actions.close();

View File

@@ -43,7 +43,9 @@ describe('Code node', () => {
const getParameter = () => ndv.getters.parameterInput('jsCode').should('be.visible');
const getEditor = () => getParameter().find('.cm-content').should('exist');
getEditor().type('{selectall}').paste(`$input.itemMatching()
getEditor()
.type('{selectall}')
.paste(`$input.itemMatching()
$input.item
$('When clicking Test workflow').item
$input.first(1)
@@ -68,7 +70,9 @@ return
ndv.getters.parameterInput('mode').click();
ndv.actions.selectOptionInParameterDropdown('mode', 'Run Once for Each Item');
getEditor().type('{selectall}').paste(`$input.itemMatching()
getEditor()
.type('{selectall}')
.paste(`$input.itemMatching()
$input.all()
$input.first()
$input.item()

View File

@@ -7,7 +7,8 @@
"test:e2e:ui": "scripts/run-e2e.js ui",
"test:e2e:dev": "scripts/run-e2e.js dev",
"test:e2e:all": "scripts/run-e2e.js all",
"format": "prettier --write . --ignore-path ../.prettierignore",
"format": "biome format --write .",
"format:check": "biome ci .",
"lint": "eslint . --quiet",
"lintfix": "eslint . --fix",
"develop": "cd ..; pnpm dev",