-
-
Notifications
You must be signed in to change notification settings - Fork 856
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
308 changed files
with
2,635 additions
and
2,550 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,26 +69,12 @@ repos: | |
pyproject.toml | | ||
src/frontend/vite.config.ts | | ||
)$ | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v4.0.0-alpha.8" | ||
hooks: | ||
- id: prettier | ||
files: ^src/frontend/.*\.(js|jsx|ts|tsx)$ | ||
additional_dependencies: | ||
- "prettier@^2.4.1" | ||
- "@trivago/prettier-plugin-sort-imports" | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: "v9.12.0" | ||
hooks: | ||
- id: eslint | ||
additional_dependencies: | ||
- eslint@^8.41.0 | ||
- eslint-config-google@^0.14.0 | ||
- [email protected] | ||
- [email protected] | ||
- "@typescript-eslint/eslint-plugin@latest" | ||
- "@typescript-eslint/parser" | ||
files: ^src/frontend/.*\.(js|jsx|ts|tsx)$ | ||
- repo: https://github.com/biomejs/pre-commit | ||
rev: "v0.5.0" | ||
hooks: | ||
- id: biome-check | ||
additional_dependencies: ["@biomejs/[email protected]"] | ||
files: ^src/frontend/.*\.(js|ts|tsx)$ | ||
- repo: https://github.com/gitleaks/gitleaks | ||
rev: v8.21.0 | ||
hooks: | ||
|
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,5 @@ | ||
{ | ||
"recommendations": [ | ||
"biomejs.biome" | ||
] | ||
} |
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,8 @@ | ||
{ | ||
"[typescript]": { | ||
"editor.defaultFormatter": "biomejs.biome" | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"quickfix.biome": "explicit" | ||
} | ||
} |
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,40 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "single", | ||
"jsxQuoteStyle": "single", | ||
"trailingCommas": "none", | ||
"indentStyle": "space" | ||
} | ||
}, | ||
"linter": { | ||
"rules": { | ||
"suspicious" : { | ||
"noExplicitAny": "off", | ||
"noDoubleEquals": "off", | ||
"noArrayIndexKey": "off", | ||
"useDefaultSwitchClauseLast": "off" | ||
}, | ||
"style": { | ||
"noUselessElse": "off", | ||
"noNonNullAssertion": "off", | ||
"noParameterAssign": "off" | ||
}, "correctness":{ | ||
"useExhaustiveDependencies": "off", | ||
"useJsxKeyInIterable": "off", | ||
"noUnsafeOptionalChaining": "off", | ||
"noSwitchDeclarations": "off", | ||
"noUnusedImports":"error" | ||
}, "complexity": { | ||
"noBannedTypes": "off", | ||
"noExtraBooleanCast": "off", | ||
"noForEach": "off", | ||
"noUselessSwitchCase": "off", | ||
"useLiteralKeys":"off" | ||
}, "performance": { | ||
"noDelete":"off" | ||
} | ||
} | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { IconPlus } from '@tabler/icons-react'; | ||
|
||
import { ActionButton, ActionButtonProps } from './ActionButton'; | ||
import { ActionButton, type ActionButtonProps } from './ActionButton'; | ||
|
||
/** | ||
* A generic icon button which is used to add or create a new item | ||
*/ | ||
export function AddItemButton(props: Readonly<ActionButtonProps>) { | ||
return <ActionButton {...props} color="green" icon={<IconPlus />} />; | ||
return <ActionButton {...props} color='green' icon={<IconPlus />} />; | ||
} |
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
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
Oops, something went wrong.