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
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs ./node_modules/.bin/prettier --write --ignore-unknown",
"command": "jq -r '.tool_input.file_path' | xargs ./node_modules/.bin/oxfmt --no-error-on-unmatched-pattern",
"timeout": 10
}
]
Expand Down
3 changes: 0 additions & 3 deletions .claude/skills/add-relevant-docs/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Used on list pages and detail pages inside `<PageHeader>`.
```tsx
import { DocsPopover } from '~/components/DocsPopover'
import { docLinks } from '~/util/links'

;<PageHeader>
<PageTitle icon={<SomeIcon24 />}>Page Title</PageTitle>
<DocsPopover
Expand All @@ -107,7 +106,6 @@ import { SideModalFormDocs } from '~/ui/lib/ModalLinks'
import { docLinks } from '~/util/links'

// Inside the form, after form fields:

;<SideModalFormDocs docs={[docLinks.someLink]} />
```

Expand All @@ -116,7 +114,6 @@ For custom links not in `docLinks`, use `ModalLinks` and `ModalLink` directly:
```tsx
import { ModalLink, ModalLinks } from '~/ui/lib/ModalLinks'
import { links } from '~/util/links'

;<ModalLinks heading="Relevant docs">
<ModalLink to={links.somePageDocs} label="Human-Readable Label" />
</ModalLinks>
Expand Down
29 changes: 29 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 92,
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"experimentalTailwindcss": {},
"experimentalSortImports": {
"internalPattern": ["~/", "app/"],
"partitionByComment": true,
"customGroups": [{ "groupName": "oxide", "elementNamePattern": ["@oxide/**"] }],
"groups": [
"builtin",
"external",
"oxide",
"internal",
["parent", "sibling", "index"],
"unknown"
]
},
"experimentalSortPackageJson": false,
"ignorePatterns": [
"dist/**",
"coverage/**",
"templates/**",
"mockServiceWorker.js",
"index.html"
]
}
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

30 changes: 0 additions & 30 deletions .prettierrc.js

This file was deleted.

6 changes: 1 addition & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"oxc.oxc-vscode",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss"
]
"recommendations": ["oxc.oxc-vscode", "bradlc.vscode-tailwindcss"]
}
14 changes: 7 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"[jsonc]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[javascriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
"[jsonc]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[json]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[javascript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[javascriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[typescript]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"[typescriptreact]": { "editor.defaultFormatter": "oxc.oxc-vscode" },
"typescript.tsdk": "node_modules/typescript/lib",
"editor.formatOnSave": true,
"tailwindCSS.experimental.classRegex": ["classed.[a-z]+`([^`]*)`"],
Expand All @@ -13,7 +13,7 @@
"explorer.fileNesting.expand": false,
"explorer.fileNesting.patterns": {
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
"package.json": "package-lock.json, .babelrc, .editorconfig, .figma*, .github*, .huskyrc*, plopfile*, .oxlintrc*, .prettier*, .vscode*, playwright.config.*, prettier*, tsconfig.*, vitest.config.*, yarn*, postcss.config.*, tailwind.config.*, vite.config.ts, mockServiceWorker.js, vercel.json, .licenserc.yaml, LICENSE"
"package.json": "package-lock.json, .babelrc, .editorconfig, .figma*, .github*, .huskyrc*, plopfile*, .oxlintrc*, .oxfmtrc*, .prettier*, .vscode*, playwright.config.*, tsconfig.*, vitest.config.*, yarn*, postcss.config.*, tailwind.config.*, vite.config.ts, mockServiceWorker.js, vercel.json, .licenserc.yaml, LICENSE"
},
"vite.browserType": "system",
"vite.buildCommand": "npm run build",
Expand Down
2 changes: 1 addition & 1 deletion app/api/__tests__/client.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { describe, expect, it, vi } from 'vitest'
import { project } from '@oxide/api-mocks'

import { api, q, useApiMutation } from '..'
import type { DiskCreate } from '../__generated__/Api'
import { overrideOnce } from '../../../test/unit/server'
import type { DiskCreate } from '../__generated__/Api'

// TODO: rethink whether these tests need to exist when they are so well-covered
// by playwright tests
Expand Down
1 change: 1 addition & 0 deletions app/api/__tests__/safety.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { execSync } from 'child_process'
import fs from 'fs'
import path from 'path'

import { expect, it } from 'vitest'

it('Generated API client version matches API version specified for deployment', () => {
Expand Down
1 change: 0 additions & 1 deletion app/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

// for convenience so we can do `import type { ApiTypes } from '@oxide/api'`
import type * as ApiTypes from './__generated__/Api'

import './window.ts'

export * from './client'
Expand Down
2 changes: 0 additions & 2 deletions app/hooks/use-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
* Copyright Oxide Computer Company
*/
import Mousetrap from 'mousetrap'

import 'mousetrap/plugins/global-bind/mousetrap-global-bind'

import { useEffect, useRef } from 'react'

type Key = Parameters<typeof Mousetrap.bind>[0]
Expand Down
1 change: 0 additions & 1 deletion app/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { routes } from './routes'
// this is the only allowed css import
// eslint-disable-next-line no-restricted-imports
import '~/ui/styles/index.css'

import { SkipLink } from '~/ui/lib/SkipLink'

if (process.env.SHA) {
Expand Down
3 changes: 2 additions & 1 deletion app/pages/project/instances/AntiAffinityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ export function AntiAffinityCard() {

let disabledReason = undefined
if (!instanceCan.addToAffinityGroup(instanceData)) {
disabledReason =
disabledReason = (
// prettier-ignore
<>Only <HL>stopped</HL> instances can be added to a group</>
)
} else if (allGroups.items.length === 0) {
disabledReason = 'No groups found'
} else if (nonMemberGroups.length === 0) {
Expand Down
Loading
Loading