chore(docs): Fix prettier warnings (#2952)

* chore(docs): Fix prettier warnings
This commit is contained in:
Pete Johanson 2025-06-01 13:02:39 -06:00 committed by GitHub
parent 461f5c832f
commit cb00077273
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 24 additions and 16 deletions

View File

@ -12,8 +12,8 @@ repos:
types_or: [c++, c] types_or: [c++, c]
args: args:
- -i - -i
- repo: https://github.com/pre-commit/mirrors-prettier - repo: https://github.com/rbubley/mirrors-prettier
rev: v2.7.1 rev: 787fb9f542b140ba0b2aced38e6a3e68021647a3
hooks: hooks:
- id: prettier - id: prettier
exclude: | exclude: |
@ -22,9 +22,6 @@ repos:
CHANGELOG.md| CHANGELOG.md|
.release-please-manifest.json .release-please-manifest.json
)$ )$
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
additional_dependencies:
- prettier@2.8.7
- repo: https://github.com/jorisroovers/gitlint - repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1 rev: v0.19.1
hooks: hooks:

View File

@ -310,4 +310,5 @@ To use your dongled keyboard with [ZMK Studio](../../features/studio.md), apply
If you ever want to "undongle" your keyboard, simply remove these CMake arguments and flash the resulting firmware (after a `settings_reset`). If you ever want to "undongle" your keyboard, simply remove these CMake arguments and flash the resulting firmware (after a `settings_reset`).
[^1]: If you have a custom dongle that uses an onboard MCU, then you will need to take a slightly different approach that isn't currently documented. [^1]: If you have a custom dongle that uses an onboard MCU, then you will need to take a slightly different approach that isn't currently documented.
[^2]: If you are building locally, you can append these flags to the end of the [build command](../local-toolchain/build-flash.mdx#cmake-arguments). [^2]: If you are building locally, you can append these flags to the end of the [build command](../local-toolchain/build-flash.mdx#cmake-arguments).

View File

@ -20,10 +20,9 @@ function itemIds(item: HardwareMetadata) {
if (item.type == "board" || item.type == "shield") { if (item.type == "board" || item.type == "shield") {
const nodes = (item.siblings ?? [item.id]) const nodes = (item.siblings ?? [item.id])
.map((id) => <code key={id}>{id}</code>) .map((id) => <code key={id}>{id}</code>)
.reduce<ElementOrString[]>( .reduce<
(prev, curr, index) => [...prev, index > 0 ? ", " : "", curr], ElementOrString[]
[] >((prev, curr, index) => [...prev, index > 0 ? ", " : "", curr], []);
);
return <span key={item.id}>{nodes}</span>; return <span key={item.id}>{nodes}</span>;
} else { } else {
return <code key={item.id}>{item.id}</code>; return <code key={item.id}>{item.id}</code>;

View File

@ -10,8 +10,12 @@ interface InterconnectTabsProps {
} }
function mapInterconnect(interconnect: Interconnect, gpio: boolean) { function mapInterconnect(interconnect: Interconnect, gpio: boolean) {
const content = require(`@site/src/data/interconnects/${interconnect.id}/design_guideline.md`); const content = require(
const imageUrl = require(`@site/docs/assets/interconnects/${interconnect.id}/pinout.png`); `@site/src/data/interconnects/${interconnect.id}/design_guideline.md`
);
const imageUrl = require(
`@site/docs/assets/interconnects/${interconnect.id}/pinout.png`
);
return ( return (
<TabItem value={interconnect.id} key={interconnect.id}> <TabItem value={interconnect.id} key={interconnect.id}>
<img src={imageUrl.default} /> <img src={imageUrl.default} />

View File

@ -15,7 +15,8 @@
.powerEstimateBar { .powerEstimateBar {
height: 64px; height: 64px;
width: 100%; width: 100%;
box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, box-shadow:
rgba(0, 0, 0, 0.03) 0px 10px 20px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; rgba(0, 0, 0, 0.1) 0px 1px 4px 0px;
border-radius: 64px; border-radius: 64px;
display: flex; display: flex;

View File

@ -9,7 +9,8 @@
padding: 10px 20px; padding: 10px 20px;
background: var(--ifm-background-surface-color); background: var(--ifm-background-surface-color);
border-radius: 4px; border-radius: 4px;
box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, box-shadow:
rgba(0, 0, 0, 0.03) 0px 10px 20px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; rgba(0, 0, 0, 0.1) 0px 1px 4px 0px;
} }
@ -40,7 +41,8 @@ span[data-tooltip]::before {
background: var(--ifm-background-surface-color); background: var(--ifm-background-surface-color);
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, box-shadow:
rgba(0, 0, 0, 0.03) 0px 10px 20px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; rgba(0, 0, 0, 0.1) 0px 1px 4px 0px;
transition: opacity 0.2s ease; transition: opacity 0.2s ease;
transform: translate(-50%, -100%); transform: translate(-50%, -100%);
@ -180,7 +182,8 @@ select > option {
padding: 20px 20px; padding: 20px 20px;
background: var(--ifm-background-surface-color); background: var(--ifm-background-surface-color);
border-radius: 4px; border-radius: 4px;
box-shadow: rgba(0, 0, 0, 0.03) 0px 10px 20px 0px, box-shadow:
rgba(0, 0, 0, 0.03) 0px 10px 20px 0px,
rgba(0, 0, 0, 0.1) 0px 1px 4px 0px; rgba(0, 0, 0, 0.1) 0px 1px 4px 0px;
width: 500px; width: 500px;
} }

View File

@ -1,7 +1,10 @@
import type { SyntaxNode } from "web-tree-sitter"; import type { SyntaxNode } from "web-tree-sitter";
export class Range { export class Range {
constructor(public startIndex: number, public endIndex: number) {} constructor(
public startIndex: number,
public endIndex: number
) {}
} }
export class TextEdit extends Range { export class TextEdit extends Range {