Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import tseslint from "typescript-eslint";
import { defineConfig, globalIgnores } from "eslint/config";

export default defineConfig([
globalIgnores(["dist", "storybook-static"]),
globalIgnores(["dist", "storybook-static", "gitignore"]),
{
files: ["**/*.{ts,tsx}"],
extends: [
Expand All @@ -24,7 +24,10 @@ export default defineConfig([
},
rules: {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unused-vars": ["warn", {
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
}],
},
},
...storybook.configs["flat/recommended"],
Expand Down
1 change: 0 additions & 1 deletion scripts/generate-css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ const root = path.resolve(import.meta.dirname, '..');

interface DimensionValue { value: number; unit: string }
interface DTCGToken { $value: unknown; $type: string; $description?: string }
interface TokenGroup { [key: string]: DTCGToken | TokenGroup }

interface TokenFile {
color: Record<string, Record<string, DTCGToken>>;
Expand Down
2 changes: 1 addition & 1 deletion scripts/token-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const server = http.createServer((req, res) => {
try {
const content = fs.readFileSync(filePath, 'utf-8');
json(res, 200, JSON.parse(content));
} catch (err) {
} catch {
json(res, 500, { error: `Failed to read ${tokenType} tokens` });
}
return;
Expand Down
5 changes: 0 additions & 5 deletions src/components/Dropdown/DropdownField.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ const choices = {
choiceValues: ["red", "green", "blue"],
};

// Helper to open the dropdown
async function openDropdown(user: ReturnType<typeof userEvent.setup>) {
await user.click(screen.getByRole("button", { name: /select\.\.\.|red|green|blue/i }));
}

// ─── DropdownField (single-select) ───────────────────────────────────────────

describe("DropdownField - visibility", () => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/MessageBanner/MessageBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { Info, CheckCircle, AlertCircle, AlertTriangle, X } from 'lucide-react'
import { Info, CheckCircle, AlertCircle, AlertTriangle } from 'lucide-react'
import type { SAILShape, SAILMarginSize, SAILAlign } from '../../types/sail'
import type { ButtonWidgetProps } from '../Button/ButtonWidget'
import { ButtonWidget } from '../Button/ButtonWidget'
Expand Down
2 changes: 1 addition & 1 deletion src/components/RadioButton/RadioButtonField.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ describe("RadioButtonField - choiceStyle CARDS", () => {
it("clicking the card container (not the input) triggers selection", async () => {
const user = userEvent.setup();
const onChange = vi.fn();
const { container } = render(
render(
<RadioButtonField {...choices} choiceStyle="CARDS" onChange={onChange} />
);
// Click the label text (part of the card, not the input itself)
Expand Down
3 changes: 0 additions & 3 deletions src/components/ReadOnlyGrid/ReadOnlyGrid.properties.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,6 @@ describe("Property 3: Column configuration application", () => {

// Hidden column labels should NOT appear in any header
columns.hidden.forEach((col) => {
const matchingHeaders = headers.filter((h) =>
h.textContent?.includes(col.label)
);
// Only fail if the hidden label uniquely doesn't appear
// (it could coincidentally match a visible label, so we check headers only)
const headerTexts = headers.map((h) => h.textContent);
Expand Down
3 changes: 1 addition & 2 deletions src/components/ReadOnlyGrid/ReadOnlyGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export const ReadOnlyGrid: React.FC<ReadOnlyGridProps> = ({
const pageSize = pageSizeProp > 0 ? pageSizeProp : 10;

// Normalize data — treat undefined/null/non-array as empty
const rows = Array.isArray(data) ? data : [];
const rows = React.useMemo(() => Array.isArray(data) ? data : [], [data]);

// Paging state (1-based)
const [currentPage, setCurrentPage] = React.useState(1);
Expand Down Expand Up @@ -281,7 +281,6 @@ export const ReadOnlyGrid: React.FC<ReadOnlyGridProps> = ({
const needsScrollContainer = height !== "AUTO" && heightClass !== "";

// Compute paging state (use sortedRows for total count)
const totalPages = Math.ceil(sortedRows.length / pageSize);
const startIndex = (currentPage - 1) * pageSize;
const endIndex = Math.min(startIndex + pageSize, sortedRows.length);

Expand Down
Loading