From c864a4e4ac135e0ec05753eebdb30765ba167118 Mon Sep 17 00:00:00 2001 From: gauravwarale Date: Thu, 2 Jul 2026 15:08:20 +0530 Subject: [PATCH 1/2] Upgrade Nextjs and remove eslint and prettier --- web/.eslintrc.json | 3 --- web/.oxfmtrc.json | 8 ++++++ web/.oxlintrc.json | 16 ++++++++++++ web/.prettierignore | 6 ----- web/.prettierrc | 6 ----- web/eslint.config.mjs | 9 ------- web/package.json | 26 +++++++------------ web/src/app/globals.css | 1 - .../AutoRefreshSelect/AutoRefreshSelect.tsx | 6 ++--- web/src/common/ClientLayout/ClientLayout.tsx | 8 ++++-- web/src/components/ErrorPage/ErrorPage.tsx | 2 +- web/src/components/Header/Header.tsx | 2 +- .../components/NavigationBar/LeftNavBar.tsx | 3 +-- .../ClustersDetails/ClustersDetails.tsx | 2 +- .../ClustersDetails/ClustersDetailsHeader.tsx | 4 +-- .../CommandDetails/CommandDetails.tsx | 2 +- .../CommandDetails/CommandDetailsHeader.tsx | 4 +-- .../CommandDetails/CommandInformationPane.tsx | 1 - .../modules/Jobs/JobDetails/JobDetails.tsx | 2 +- 19 files changed, 50 insertions(+), 61 deletions(-) delete mode 100644 web/.eslintrc.json create mode 100644 web/.oxfmtrc.json create mode 100644 web/.oxlintrc.json delete mode 100644 web/.prettierignore delete mode 100644 web/.prettierrc delete mode 100644 web/eslint.config.mjs diff --git a/web/.eslintrc.json b/web/.eslintrc.json deleted file mode 100644 index 37224185..00000000 --- a/web/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["next/core-web-vitals", "next/typescript"] -} diff --git a/web/.oxfmtrc.json b/web/.oxfmtrc.json new file mode 100644 index 00000000..559cede6 --- /dev/null +++ b/web/.oxfmtrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "./node_modules/oxfmt/configuration_schema.json", + "printWidth": 80, + "semi": false, + "singleQuote": true, + "jsxSingleQuote": true, + "sortTailwindcss": true +} diff --git a/web/.oxlintrc.json b/web/.oxlintrc.json new file mode 100644 index 00000000..c46b9fa5 --- /dev/null +++ b/web/.oxlintrc.json @@ -0,0 +1,16 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": [ + "react", + "react-perf", + "nextjs", + "jsx-a11y", + "import", + "typescript", + "oxc" + ], + "categories": { + "correctness": "error" + }, + "ignorePatterns": [".next/**", "next-env.d.ts"] +} diff --git a/web/.prettierignore b/web/.prettierignore deleted file mode 100644 index c1b9e4ba..00000000 --- a/web/.prettierignore +++ /dev/null @@ -1,6 +0,0 @@ -# Add files here to ignore them from prettier formatting - -pnpm-lock.yaml -**/.next/* -**/tsconfig.json -.prettierrc diff --git a/web/.prettierrc b/web/.prettierrc deleted file mode 100644 index 27ce7909..00000000 --- a/web/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "jsxSingleQuote": true, - "plugins": ["prettier-plugin-sort-json", "prettier-plugin-tailwindcss"], - "semi": false, - "singleQuote": true -} diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs deleted file mode 100644 index ca29b299..00000000 --- a/web/eslint.config.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import { defineConfig } from 'eslint/config' -import nextCoreWebVitals from 'eslint-config-next/core-web-vitals' -import nextTypescript from 'eslint-config-next/typescript' - -export default defineConfig([ - { - extends: [...nextCoreWebVitals, ...nextTypescript], - }, -]) diff --git a/web/package.json b/web/package.json index 199083d0..4d79c3d7 100644 --- a/web/package.json +++ b/web/package.json @@ -2,28 +2,24 @@ "name": "heimdall", "version": "0.1.0", "private": true, - "packageManager": "pnpm@10.28.2", "scripts": { "dev": "PORT=4000 next dev", "build": "next build", "start": "next start", - "lint": "eslint .", - "prettier": "prettier --write .", - "prettier-fix": "prettier --write --ignore-path .gitignore src/**/*", - "prettier-check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"", - "lint-fix": "eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=0 --fix", - "format": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,scss,md}\"", + "lint": "oxlint", + "lint-fix": "oxlint --fix", + "format": "oxfmt --check .", "get-types": "pnpm update @patterninc/react-ui@latest", "type-check": "tsc --noEmit" }, "dependencies": { - "@patterninc/react-ui": "^5.0.3", + "@patterninc/react-ui": "^5.0.8", "@tanstack/react-query": "^5.66.11", "@tanstack/react-query-devtools": "^5.66.11", "js-yaml": "^4.1.0", "moment": "^2.30.1", "moment-timezone": "^0.6.0", - "next": "^16.1.6", + "next": "^16.2.9", "nuqs": "^2.4.1", "react": "^19.2.4", "react-dom": "^19.2.4", @@ -39,15 +35,11 @@ "@types/react-dom": "^19.2.3", "@types/react-syntax-highlighter": "^15.5.13", "babel-plugin-react-compiler": "^1.0.0", - "eslint": "^9", - "eslint-config-next": "^16.0.10", - "eslint-config-prettier": "^10.0.2", - "eslint-plugin-prettier": "^5.2.3", + "oxfmt": "^0.57.0", + "oxlint": "^1.72.0", "postcss": "^8", - "prettier": "^3.5.2", - "prettier-plugin-sort-json": "^4.1.1", - "prettier-plugin-tailwindcss": "^0.7.2", "tailwindcss": "^4.1.11", "typescript": "^5" - } + }, + "packageManager": "pnpm@10.28.2" } diff --git a/web/src/app/globals.css b/web/src/app/globals.css index 423128f0..c019d5b5 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -23,7 +23,6 @@ ::file-selector-button { border-color: var(--color-gray-200, currentcolor); } - } @utility text-balance { diff --git a/web/src/common/AutoRefreshSelect/AutoRefreshSelect.tsx b/web/src/common/AutoRefreshSelect/AutoRefreshSelect.tsx index f67ec0d7..ef929df3 100644 --- a/web/src/common/AutoRefreshSelect/AutoRefreshSelect.tsx +++ b/web/src/common/AutoRefreshSelect/AutoRefreshSelect.tsx @@ -4,7 +4,6 @@ import { Select } from '@patterninc/react-ui' import { useContext, useState } from 'react' import { AutoRefreshContext } from '../AutoRefreshProvider/context' - export type RefreshInterval = { label: string value: number @@ -27,9 +26,10 @@ export const AutoRefreshSelect = () => { ) return ( -
+
Auto Refresh: -
{/* Fixed width ensures the popover menu inherits the same width, preventing options from being cut off or extending beyond the window when selecting longer options like "OFF" */} +
+ {/* Fixed width ensures the popover menu inherits the same width, preventing options from being cut off or extending beyond the window when selecting longer options like "OFF" */}