FIX: Update biome and apply automatic fixes

This commit is contained in:
Nicolás Hatcher
2025-11-13 18:57:46 +01:00
committed by Nicolás Hatcher Andrés
parent e0339f641b
commit 4e9d7611a8
21 changed files with 636 additions and 666 deletions

View File

@@ -1,5 +1,4 @@
{
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "@ironcalc/workbook",
"version": "0.3.2",
"version": "0.6.0",
"type": "module",
"main": "./dist/ironcalc.js",
"module": "./dist/ironcalc.js",
@@ -26,7 +26,7 @@
"react-i18next": "^15.5.2"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "2.3.5",
"@storybook/react": "^9.0.5",
"@storybook/react-vite": "^9.0.5",
"@vitejs/plugin-react": "^4.2.1",

View File

@@ -1,9 +1,9 @@
import {
getTokens,
type Model,
type Range,
type Reference,
type TokenType,
getTokens,
} from "@ironcalc/wasm";
import type { JSX } from "react";
import type { ActiveRange } from "../workbookState";

View File

@@ -2,12 +2,12 @@ import type { Model } from "@ironcalc/wasm";
import { styled } from "@mui/material";
import { Fx } from "../../icons";
import { theme } from "../../theme";
import { FORMULA_BAR_HEIGHT } from "../constants";
import Editor from "../Editor/Editor";
import {
COLUMN_WIDTH_SCALE,
ROW_HEIGH_SCALE,
} from "../WorksheetCanvas/constants";
import { FORMULA_BAR_HEIGHT } from "../constants";
import type { WorkbookState } from "../workbookState";
type FormulaBarProps = {

View File

@@ -6,8 +6,8 @@ import {
MenuItem,
Paper,
Select,
TextField,
styled,
TextField,
} from "@mui/material";
import { t } from "i18next";
import { Check, Tag } from "lucide-react";

View File

@@ -1,5 +1,5 @@
import type { DefinedName, WorksheetProperties } from "@ironcalc/wasm";
import { Button, Tooltip, styled } from "@mui/material";
import { Button, styled, Tooltip } from "@mui/material";
import { t } from "i18next";
import {
ArrowLeft,

View File

@@ -1,4 +1,4 @@
import { Dialog, TextField, styled } from "@mui/material";
import { Dialog, styled, TextField } from "@mui/material";
import { Check, X } from "lucide-react";
import { useState } from "react";
import { useTranslation } from "react-i18next";

View File

@@ -1,5 +1,5 @@
import { Button, Menu, MenuItem, styled } from "@mui/material";
import type { MenuItemProps } from "@mui/material";
import { Button, Menu, MenuItem, styled } from "@mui/material";
import {
ChevronDown,
EyeOff,

View File

@@ -1,12 +1,11 @@
import { styled } from "@mui/material";
import { Tooltip } from "@mui/material";
import { styled, Tooltip } from "@mui/material";
import { Menu, Plus } from "lucide-react";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { IronCalcLogo } from "../../icons";
import { theme } from "../../theme";
import { StyledButton } from "../Toolbar/Toolbar";
import { NAVIGATION_HEIGHT } from "../constants";
import { StyledButton } from "../Toolbar/Toolbar";
import type { WorkbookState } from "../workbookState";
import SheetListMenu from "./SheetListMenu";
import SheetTab from "./SheetTab";

View File

@@ -4,8 +4,8 @@ import type {
HorizontalAlignment,
VerticalAlignment,
} from "@ironcalc/wasm";
import Tooltip from "@mui/material/Tooltip";
import { styled } from "@mui/material/styles";
import Tooltip from "@mui/material/Tooltip";
import type {} from "@mui/system";
import {
AlignCenter,
@@ -45,13 +45,13 @@ import { ArrowMiddleFromLine } from "../../icons";
import { theme } from "../../theme";
import BorderPicker from "../BorderPicker/BorderPicker";
import ColorPicker from "../ColorPicker/ColorPicker";
import { TOOLBAR_HEIGHT } from "../constants";
import FormatMenu from "../FormatMenu/FormatMenu";
import {
NumberFormats,
decreaseDecimalPlaces,
increaseDecimalPlaces,
NumberFormats,
} from "../FormatMenu/formatUtil";
import { TOOLBAR_HEIGHT } from "../constants";
type ToolbarProperties = {
canUndo: boolean;

View File

@@ -7,10 +7,20 @@ import type {
import { styled } from "@mui/material/styles";
import { t } from "i18next";
import { useCallback, useEffect, useRef, useState } from "react";
import {
CLIPBOARD_ID_SESSION_STORAGE_KEY,
getNewClipboardId,
} from "../clipboard";
import { TOOLBAR_HEIGHT } from "../constants";
import FormulaBar from "../FormulaBar/FormulaBar";
import RightDrawer, { DEFAULT_DRAWER_WIDTH } from "../RightDrawer/RightDrawer";
import SheetTabBar from "../SheetTabBar";
import Toolbar from "../Toolbar/Toolbar";
import {
getCellAddress,
getFullRangeToString,
type NavigationKey,
} from "../util";
import Worksheet from "../Worksheet/Worksheet";
import {
COLUMN_WIDTH_SCALE,
@@ -20,16 +30,6 @@ import {
} from "../WorksheetCanvas/constants";
import type WorksheetCanvas from "../WorksheetCanvas/worksheetCanvas";
import { devicePixelRatio } from "../WorksheetCanvas/worksheetCanvas";
import {
CLIPBOARD_ID_SESSION_STORAGE_KEY,
getNewClipboardId,
} from "../clipboard";
import { TOOLBAR_HEIGHT } from "../constants";
import {
type NavigationKey,
getCellAddress,
getFullRangeToString,
} from "../util";
import type { WorkbookState } from "../workbookState";
import useKeyboardNavigation from "./useKeyboardNavigation";

View File

@@ -1,5 +1,5 @@
import { type KeyboardEvent, type RefObject, useCallback } from "react";
import { type NavigationKey, isEditingKey, isNavigationKey } from "../util";
import { isEditingKey, isNavigationKey, type NavigationKey } from "../util";
export enum Border {
Top = "top",

View File

@@ -1,4 +1,4 @@
import { type Model, columnNameFromNumber } from "@ironcalc/wasm";
import { columnNameFromNumber, type Model } from "@ironcalc/wasm";
import { styled } from "@mui/material/styles";
import {
forwardRef,
@@ -8,18 +8,18 @@ import {
useRef,
useState,
} from "react";
import { FORMULA_BAR_HEIGHT, NAVIGATION_HEIGHT } from "../constants";
import Editor from "../Editor/Editor";
import type { Cell } from "../types";
import {
COLUMN_WIDTH_SCALE,
LAST_COLUMN,
LAST_ROW,
ROW_HEIGH_SCALE,
outlineBackgroundColor,
outlineColor,
ROW_HEIGH_SCALE,
} from "../WorksheetCanvas/constants";
import WorksheetCanvas from "../WorksheetCanvas/worksheetCanvas";
import { FORMULA_BAR_HEIGHT, NAVIGATION_HEIGHT } from "../constants";
import type { Cell } from "../types";
import type { WorkbookState } from "../workbookState";
import CellContextMenu from "./CellContextMenu";
import usePointer from "./usePointer";

View File

@@ -1,13 +1,13 @@
import type { Model } from "@ironcalc/wasm";
import { type PointerEvent, type RefObject, useCallback, useRef } from "react";
import { isInReferenceMode } from "../Editor/util";
import type { Cell } from "../types";
import { rangeToStr } from "../util";
import type WorksheetCanvas from "../WorksheetCanvas/worksheetCanvas";
import {
headerColumnWidth,
headerRowHeight,
} from "../WorksheetCanvas/worksheetCanvas";
import type { Cell } from "../types";
import { rangeToStr } from "../util";
import type { WorkbookState } from "../workbookState";
interface PointerSettings {

View File

@@ -5,9 +5,6 @@ import type { Cell } from "../types";
import type { WorkbookState } from "../workbookState";
import {
COLUMN_WIDTH_SCALE,
LAST_COLUMN,
LAST_ROW,
ROW_HEIGH_SCALE,
cellPadding,
defaultTextColor,
gridColor,
@@ -17,7 +14,10 @@ import {
headerSelectedBackground,
headerSelectedColor,
headerTextColor,
LAST_COLUMN,
LAST_ROW,
outlineColor,
ROW_HEIGH_SCALE,
} from "./constants";
import { attachOutlineHandle } from "./outlineHandle";
import { computeWrappedLines, hexToRGBA10Percent } from "./util";

View File

@@ -1,5 +1,5 @@
import { readFile } from "node:fs/promises";
import { Model, initSync } from "@ironcalc/wasm";
import { initSync, Model } from "@ironcalc/wasm";
import { expect, test } from "vitest";
// This is a simple test that showcases how to load the wasm module in the tests

View File

@@ -1,5 +1,5 @@
import { readFile } from "node:fs/promises";
import { type SelectedView, initSync } from "@ironcalc/wasm";
import { initSync, type SelectedView } from "@ironcalc/wasm";
import { expect, test } from "vitest";
import {
decreaseDecimalPlaces,

View File

@@ -1,10 +1,9 @@
import type { Area, Cell } from "./types";
import {
type SelectedView,
columnNameFromNumber,
quoteName,
type SelectedView,
} from "@ironcalc/wasm";
import type { Area, Cell } from "./types";
import { LAST_COLUMN, LAST_ROW } from "./WorksheetCanvas/constants";
/**

View File

@@ -1,3 +1,4 @@
import ArrowMiddleFromLine from "./arrow-middle-from-line.svg?react";
import BorderBottomIcon from "./border-bottom.svg?react";
import BorderCenterHIcon from "./border-center-h.svg?react";
import BorderCenterVIcon from "./border-center-v.svg?react";
@@ -8,21 +9,17 @@ import BorderOuterIcon from "./border-outer.svg?react";
import BorderRightIcon from "./border-right.svg?react";
import BorderStyleIcon from "./border-style.svg?react";
import BorderTopIcon from "./border-top.svg?react";
import ArrowMiddleFromLine from "./arrow-middle-from-line.svg?react";
import DeleteColumnIcon from "./delete-column.svg?react";
import DeleteRowIcon from "./delete-row.svg?react";
import Fx from "./fx.svg?react";
import InsertColumnLeftIcon from "./insert-column-left.svg?react";
import InsertColumnRightIcon from "./insert-column-right.svg?react";
import InsertRowAboveIcon from "./insert-row-above.svg?react";
import InsertRowBelow from "./insert-row-below.svg?react";
import IronCalcIcon from "./ironcalc_icon.svg?react";
import IronCalcIconWhite from "./ironcalc_icon_white.svg?react";
import IronCalcLogo from "./orange+black.svg?react";
import Fx from "./fx.svg?react";
export {
ArrowMiddleFromLine,
BorderBottomIcon,

View File

@@ -1,6 +1,6 @@
import { useEffect, useState } from "react";
import { IronCalc, Model, init } from "../index";
import { IronCalc, init, Model } from "../index";
// export interface IronCalcProps {}