diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 73ec249cf..5fad97826 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -50,6 +50,39 @@ lint: parse_regex: ${semver} run: yamlfmt -version known_good_version: 0.16.0 + - name: biome + files: + - astro + - css + - graphql + - html + - javascript + - json + - sass + - typescript + commands: + - output: regex + success_codes: + - 0 + - 1 + batch: true + cache_results: true + name: lint + parse_regex: " *(?P.*?):(?P\\d+):(?P\\d+) (?P[^ ]+)(?:[^×]*\\n).*× (?P.*)\\n" + read_output_from: stderr + run: biome check ${target} + run_from: ${parent} + - output: rewrite + success_codes: + - 0 + - 1 + batch: true + cache_results: true + formatter: true + in_place: true + name: fmt + run: biome check --fix "${target}" + run_from: ${parent} enabled: - actionlint@1.7.7 - biome@2.0.0! # datasource=npm depName=@biomejs/biome diff --git a/biome.jsonc b/biome.jsonc index 5fdab4bc9..f81e4504c 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -1,24 +1,5 @@ { "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json", - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true - }, - "files": { - "includes": ["**", "!**/.trunk/**", "!**/build/**", "!**/dist/**", "!**/package.json"] - }, - "formatter": { - "attributePosition": "auto", - "bracketSpacing": true, - "enabled": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 2, - "lineEnding": "lf", - "lineWidth": 120, - "useEditorconfig": true - }, "assist": { "actions": { "source": { @@ -26,7 +7,9 @@ "level": "on", "options": { "groups": [ - { "type": false }, + { + "type": false + }, ":NODE:", ":BLANK_LINE:", "@freelensapp/**", @@ -40,6 +23,38 @@ } } }, + "files": { + "includes": ["**", "!**/.trunk/**", "!**/build/**", "!**/dist/**", "!**/package.json"] + }, + "formatter": { + "attributePosition": "auto", + "bracketSpacing": true, + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 2, + "lineEnding": "lf", + "lineWidth": 120, + "useEditorconfig": true + }, + "html": { + "formatter": { + "enabled": true + } + }, + "javascript": { + "formatter": { + "arrowParentheses": "always", + "attributePosition": "auto", + "bracketSameLine": false, + "bracketSpacing": true, + "jsxQuoteStyle": "double", + "quoteProperties": "asNeeded", + "quoteStyle": "double", + "semicolons": "always", + "trailingCommas": "all" + } + }, "linter": { "enabled": true, "rules": { @@ -47,20 +62,24 @@ "noRedundantRoles": "off" }, "complexity": { - "noBannedTypes": "off", // should be error later + // should be error later + "noBannedTypes": "off", "noUselessConstructor": "off", "noUselessThisAlias": "error", "noUselessTypeConstraint": "error" }, "correctness": { "noInvalidUseBeforeDeclaration": "error", - "noUnusedVariables": "off", // should be error later + // should be error later + "noUnusedVariables": "off", "useExhaustiveDependencies": "off" }, "recommended": false, "style": { "noNamespace": "error", - "noParameterAssign": "off", // should be error later + // should be error later + "noParameterAssign": "off", + "useArrayLiterals": "off", "useAsConstAssertion": "error", "useBlockStatements": "off", "useNamingConvention": { @@ -69,30 +88,24 @@ "strictCase": false } }, - "useTemplate": "off", // should be error later - "useArrayLiterals": "off" + // should be error later + "useTemplate": "off" }, "suspicious": { "noEmptyInterface": "off", - "noExplicitAny": "off", // should be error later + // should be error later + "noExplicitAny": "off", "noExtraNonNullAssertion": "error", "noMisleadingInstantiator": "error", - "noUnsafeDeclarationMerging": "off", // should be error later + // should be error later + "noUnsafeDeclarationMerging": "off", "useNamespaceKeyword": "error" } } }, - "javascript": { - "formatter": { - "arrowParentheses": "always", - "attributePosition": "auto", - "bracketSameLine": false, - "bracketSpacing": true, - "jsxQuoteStyle": "double", - "quoteProperties": "asNeeded", - "quoteStyle": "double", - "semicolons": "always", - "trailingCommas": "all" - } + "vcs": { + "clientKind": "git", + "enabled": true, + "useIgnoreFile": true } } diff --git a/freelens/static/splash.html b/freelens/static/splash.html index 39f40fa5f..d7a1b973a 100644 --- a/freelens/static/splash.html +++ b/freelens/static/splash.html @@ -134,7 +134,43 @@
- + + + + + + +
Freelens
@@ -154,9 +190,7 @@
-
- Loading... -
+
Loading...
diff --git a/packages/core/src/renderer/components/events/events.tsx b/packages/core/src/renderer/components/events/events.tsx index 0fb48d31d..0b7b1467f 100644 --- a/packages/core/src/renderer/components/events/events.tsx +++ b/packages/core/src/renderer/components/events/events.tsx @@ -47,8 +47,7 @@ enum columnId { lastSeen = "last-seen", } -export interface EventsProps - extends Partial> { +export interface EventsProps extends Partial> { className?: IClassName; compact?: boolean; compactLimit?: number; diff --git a/packages/core/src/renderer/components/item-object-list/list-layout.tsx b/packages/core/src/renderer/components/item-object-list/list-layout.tsx index df95f8878..3b74f3173 100644 --- a/packages/core/src/renderer/components/item-object-list/list-layout.tsx +++ b/packages/core/src/renderer/components/item-object-list/list-layout.tsx @@ -36,7 +36,9 @@ import type { SearchInputUrlProps } from "../input"; import type { TableProps, TableRowProps, TableSortCallbacks } from "../table"; import type { PageFiltersStore } from "./page-filters/store"; -export type ListLayoutSearchFilter = (item: I) => SingleOrMany; +export type ListLayoutSearchFilter = ( + item: I, +) => SingleOrMany; export type ListLayoutSearchFilters = Record>; export type ListLayoutItemsFilter = (items: I[]) => I[]; export type ListLayoutItemsFilters = Record>; diff --git a/packages/core/src/renderer/template.html b/packages/core/src/renderer/template.html index 87ea5dca3..b041b2856 100644 --- a/packages/core/src/renderer/template.html +++ b/packages/core/src/renderer/template.html @@ -1,7 +1,7 @@ - +
diff --git a/packages/core/static/splash.html b/packages/core/static/splash.html index 39f40fa5f..d7a1b973a 100644 --- a/packages/core/static/splash.html +++ b/packages/core/static/splash.html @@ -134,7 +134,43 @@
- + + + + + + +
Freelens
@@ -154,9 +190,7 @@
-
- Loading... -
+
Loading...