Fix lint issues

pull/1246/head^2
Zef Hemel 2025-02-22 11:50:44 +01:00
parent 538032ea94
commit 9e0925beff
4 changed files with 9 additions and 3 deletions

View File

@ -66,7 +66,7 @@
"cmd/test/test_space" "cmd/test/test_space"
], ],
"rules": { "rules": {
"exclude": ["no-explicit-any", "no-slow-types"] "exclude": ["no-explicit-any", "no-slow-types", "jsx-boolean-value"]
} }
}, },
"fmt": { "fmt": {

View File

@ -268,7 +268,7 @@ export class HttpServer {
} }
c.status(200); c.status(200);
c.header("Content-type", this.clientAssetBundle.getMimeType(assetName)); c.header("Content-type", this.clientAssetBundle.getMimeType(assetName));
let data = this.clientAssetBundle.readFileSync( const data = this.clientAssetBundle.readFileSync(
assetName, assetName,
); );
c.header("Content-length", "" + data.length); c.header("Content-length", "" + data.length);

View File

@ -130,6 +130,7 @@ export function Button({
return ( return (
<button <button
ref={buttonRef} ref={buttonRef}
type="button"
className={primary ? "sb-button-primary" : "sb-button"} className={primary ? "sb-button-primary" : "sb-button"}
onClick={(e) => { onClick={(e) => {
e.stopPropagation(); e.stopPropagation();

View File

@ -119,6 +119,7 @@ export function TopBar({
{actionButtons.map((actionButton) => { {actionButtons.map((actionButton) => {
const button = ( const button = (
<button <button
type="button"
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
@ -132,7 +133,11 @@ export function TopBar({
); );
return actionButton.href !== undefined return actionButton.href !== undefined
? <a href={actionButton.href}>{button}</a> ? (
<a href={actionButton.href} key={actionButton.href}>
{button}
</a>
)
: button; : button;
})} })}
</div> </div>