From 102e0659790442637577bebf81333b555263dd00 Mon Sep 17 00:00:00 2001 From: Timothy Yin Date: Tue, 10 Mar 2026 11:17:14 +0800 Subject: [PATCH] chore(web): config oxc --- .oxfmtrc.json | 6 ++++++ .oxlintrc.json | 42 +++++++++++++++++++++++++++++++++++++++++ apps/web/app/layout.tsx | 2 +- package.json | 10 ++++++++-- 4 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .oxfmtrc.json create mode 100644 .oxlintrc.json diff --git a/.oxfmtrc.json b/.oxfmtrc.json new file mode 100644 index 0000000..a95adde --- /dev/null +++ b/.oxfmtrc.json @@ -0,0 +1,6 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "ignorePatterns": [ + "hardware/**", + ] +} \ No newline at end of file diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..7fc683f --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,42 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": null, + "categories": {}, + "rules": {}, + "settings": { + "jsx-a11y": { + "polymorphicPropName": null, + "components": {}, + "attributes": {} + }, + "next": { + "rootDir": [] + }, + "react": { + "formComponents": [], + "linkComponents": [], + "version": null, + "componentWrapperFunctions": [] + }, + "jsdoc": { + "ignorePrivate": false, + "ignoreInternal": false, + "ignoreReplacesDocs": true, + "overrideReplacesDocs": true, + "augmentsExtendsReplacesDocs": false, + "implementsReplacesDocs": false, + "exemptDestructuredRootsFromChecks": false, + "tagNamePreference": {} + }, + "vitest": { + "typecheck": false + } + }, + "env": { + "builtin": true + }, + "globals": {}, + "ignorePatterns": [ + "hardware/**", + ] +} \ No newline at end of file diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 267edba..7c82e51 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -1,5 +1,5 @@ import type { Metadata } from "next"; -import { Geist, Geist_Mono, Noto_Sans, Saira } from "next/font/google"; +import { Geist_Mono, Noto_Sans, Saira } from "next/font/google"; import "./globals.css"; const fontSaira = Saira({ diff --git a/package.json b/package.json index d40efec..e441960 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,11 @@ "build:web": "pnpm --filter helios-web build", "start:web": "pnpm --filter helios-web start", "dev": "run-p dev:csms dev:web", - "build": "run-p build:csms build:web" + "build": "run-p build:csms build:web", + "lint": "oxlint", + "lint:fix": "oxlint --fix", + "fmt": "oxfmt", + "fmt:check": "oxfmt --check" }, "keywords": [ "ev", @@ -25,6 +29,8 @@ "license": "ISC", "packageManager": "pnpm@10.18.2", "devDependencies": { - "npm-run-all": "^4.1.5" + "npm-run-all": "^4.1.5", + "oxfmt": "^0.36.0", + "oxlint": "^1.52.0" } } \ No newline at end of file