-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Setup biome and pre-commit hooks for formatting (no-changelog) (#…
…10795) Co-authored-by: Tomi Turtiainen <[email protected]>
- Loading branch information
Showing
85 changed files
with
701 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"vcs": { | ||
"clientKind": "git", | ||
"enabled": true, | ||
"useIgnoreFile": true | ||
}, | ||
"files": { | ||
"ignore": [ | ||
"**/.turbo", | ||
"**/coverage", | ||
"**/dist", | ||
"**/package.json", | ||
"**/pnpm-lock.yaml", | ||
"**/CHANGELOG.md" | ||
] | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "tab", | ||
"indentWidth": 2, | ||
"lineEnding": "lf", | ||
"lineWidth": 100, | ||
"attributePosition": "auto", | ||
"ignore": [ | ||
// Handled by prettier | ||
"**/*.vue" | ||
] | ||
}, | ||
"organizeImports": { "enabled": false }, | ||
"linter": { | ||
"enabled": false | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"jsxQuoteStyle": "double", | ||
"quoteProperties": "asNeeded", | ||
"trailingCommas": "all", | ||
"semicolons": "always", | ||
"arrowParentheses": "always", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"quoteStyle": "single", | ||
"attributePosition": "auto" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "../node_modules/@biomejs/biome/configuration_schema.json", | ||
"extends": ["../biome.jsonc"], | ||
"formatter": { | ||
"ignore": ["fixtures/**"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
pre-commit: | ||
commands: | ||
biome_check: | ||
glob: 'packages/**/*.{js,ts,json}' | ||
run: ./node_modules/.bin/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files} | ||
stage_fixed: true | ||
prettier_check: | ||
glob: 'packages/**/*.{vue,yml,md}' | ||
run: ./node_modules/.bin/prettier --write --ignore-unknown --no-error-on-unmatched-pattern {staged_files} | ||
stage_fixed: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"folders": [ | ||
{ | ||
"path": ".", | ||
}, | ||
], | ||
"path": "." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
}, | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"prepare": "lefthook install", | ||
"preinstall": "node scripts/block-npm-install.js", | ||
"build": "turbo run build", | ||
"build:backend": "turbo run build:backend", | ||
|
@@ -19,6 +20,7 @@ | |
"clean": "turbo run clean --parallel", | ||
"reset": "node scripts/ensure-zx.mjs && zx scripts/reset.mjs", | ||
"format": "turbo run format && node scripts/format.mjs", | ||
"format:check": "turbo run format:check", | ||
"lint": "turbo run lint", | ||
"lintfix": "turbo run lintfix", | ||
"lint:backend": "turbo run lint:backend", | ||
|
@@ -38,6 +40,7 @@ | |
"worker": "./packages/cli/bin/n8n worker" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "^1.9.0", | ||
"@n8n_io/eslint-config": "workspace:*", | ||
"@types/jest": "^29.5.3", | ||
"@types/supertest": "^6.0.2", | ||
|
@@ -46,6 +49,7 @@ | |
"jest-expect-message": "^1.1.3", | ||
"jest-mock": "^29.6.2", | ||
"jest-mock-extended": "^3.0.4", | ||
"lefthook": "^1.7.15", | ||
"nock": "^13.3.2", | ||
"nodemon": "^3.0.1", | ||
"p-limit": "^3.1.0", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"$schema": "../node_modules/@biomejs/biome/configuration_schema.json", | ||
"extends": ["../../../biome.jsonc"], | ||
"files": { | ||
"ignore": ["scripts/mock-api/**"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.