Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
22a532d
H-6324: Migrate petrinaut to oxlint and verify React Compiler
kube Mar 13, 2026
c98e9b1
H-6324: Trim oxlint config by leveraging correctness category defaults
kube Mar 13, 2026
53ac414
H-6324: Add CLAUDE.md for petrinaut
kube Mar 13, 2026
9352d84
H-6324: Aggressively trim oxlint config for TS-only codebase
kube Mar 13, 2026
7eb1245
H-6324: Migrate petrinaut-website to oxlint
kube Mar 13, 2026
ec0519e
H-6324: Fix PR review findings
kube Mar 14, 2026
3900953
H-6324: Add required `id` to MenuGroup for stable React keys
kube Mar 14, 2026
2cd6534
H-6324: Restore svgo 3.3.3 in yarn.lock
kube Mar 14, 2026
3125bda
Remove id length restriction to Petrinaut
kube Mar 14, 2026
95b8383
Add back fix:eslint script
kube Mar 15, 2026
577a5e3
Remove unused dependencies from Petrinaut
kube Mar 15, 2026
624941e
Upgrade Petrinaut dev tooling to latest versions
kube Mar 15, 2026
1e336d0
Update yarn.lock
kube Mar 15, 2026
381f9df
Update @typescript/native-preview to 7.0.0-dev.20260315.1
kube Mar 15, 2026
28931fe
Upgrade petrinaut-website to vite 8 stable and plugin-react v6
kube Mar 15, 2026
63f796a
Promote all warn-level oxlint rules to error
kube Mar 15, 2026
6d6e3ce
Remove --report-unused-disable-directives-severity=error from fix:eslint
kube Mar 15, 2026
c84b3e5
Clean up unused eslint-disable directives and add missing oxlint rules
kube Mar 15, 2026
f171147
Enable oxlint type-aware linting for Petrinaut
kube Mar 15, 2026
6cecb10
Add web-worker to hash-frontend for elkjs compatibility
kube Mar 15, 2026
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
3 changes: 2 additions & 1 deletion apps/hash-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@
"signia-react": "0.1.5",
"url-regex-safe": "4.0.0",
"use-font-face-observer": "1.3.0",
"uuid": "13.0.0"
"uuid": "13.0.0",
"web-worker": "1.4.1"
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.3",
Expand Down
153 changes: 153 additions & 0 deletions apps/petrinaut-website/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "react", "jsx-a11y", "unicorn", "typescript"],
"categories": {
"correctness": "error"
},
"env": {
"builtin": true,
"es2026": true,
"browser": true
},
"rules": {
"array-callback-return": ["error", { "allowImplicit": true }],
"default-case-last": "error",
"default-param-last": "error",
"eqeqeq": ["error", "always", { "null": "ignore" }],
"guard-for-in": "error",
"no-alert": "error",
"no-cond-assign": ["error", "always"],
"no-extend-native": "error",
"no-loop-func": "error",
"no-new": "error",
"no-param-reassign": [
"error",
{
"props": true,
"ignorePropertyModificationsForRegex": ["^existing", "draft"]
}
],
"no-return-assign": ["error", "always"],
"no-self-compare": "error",
"no-sequences": "error",
"no-template-curly-in-string": "error",
"no-unsafe-optional-chaining": [
"error",
{ "disallowArithmeticOperators": true }
],
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_+",
"varsIgnorePattern": "^_+"
}
],
"no-void": ["error", { "allowAsStatement": true }],

"no-console": "error",
"new-cap": "error",
"no-new-func": "error",
"func-names": "error",
"no-bitwise": "error",
"no-multi-assign": "error",

"no-restricted-globals": [
"error",
{ "name": "isFinite", "message": "Use Number.isFinite instead" },
{ "name": "isNaN", "message": "Use Number.isNaN instead" },
"event",
"name",
"length",
"status"
],
"no-shadow": "error",
"no-use-before-define": "error",

"import/no-named-as-default": "error",
"import/no-named-as-default-member": "error",
"import/no-mutable-exports": "error",
"import/no-duplicates": "error",
"import/no-named-default": "error",
"import/no-self-import": "error",
"import/no-cycle": "error",

"react/jsx-pascal-case": ["error", { "allowAllCaps": true }],
"react/no-danger": "error",
"react/jsx-no-target-blank": ["error", { "enforceDynamicLinks": "always" }],
"react/jsx-no-comment-textnodes": "error",
"react/no-array-index-key": "error",
"react/button-has-type": [
"error",
{ "button": true, "submit": true, "reset": false }
],

"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",

"jsx-a11y/prefer-tag-over-role": "off",
"jsx-a11y/aria-role": ["error", { "ignoreNonDOM": false }],
"jsx-a11y/no-noninteractive-tabindex": [
"error",
{ "tags": [], "roles": ["tabpanel"] }
],
"jsx-a11y/label-has-associated-control": "error",
"jsx-a11y/no-static-element-interactions": [
"error",
{
"handlers": [
"onClick",
"onMouseDown",
"onMouseUp",
"onKeyPress",
"onKeyDown",
"onKeyUp"
]
}
],

"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-expect-error": "allow-with-description",
"minimumDescriptionLength": 10
}
],
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-unnecessary-type-constraint": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unsafe-function-type": "error",

"unicorn/no-new-array": "off",
"unicorn/filename-case": "error",

"constructor-super": "off",
"no-class-assign": "off",
"no-const-assign": "off",
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
"no-setter-return": "off",
"no-this-before-super": "off",
"no-unsafe-negation": "off",
"no-constant-condition": "off",
"no-throw-literal": "off",
"prefer-promise-reject-errors": "off"
},
"ignorePatterns": [
"dist/**",
"build/**",
"coverage/**",
"*.gen.*",
"*.tsbuildinfo",
".turbo/**"
]
}
23 changes: 0 additions & 23 deletions apps/petrinaut-website/eslint.config.js

This file was deleted.

17 changes: 9 additions & 8 deletions apps/petrinaut-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"scripts": {
"build": "vite build",
"dev": "vite",
"fix:eslint": "eslint --fix .",
"lint:eslint": "eslint --report-unused-disable-directives .",
"lint:tsc": "tsgo --noEmit"
"lint:tsc": "tsgo --noEmit",
"lint:eslint": "oxlint --type-aware --report-unused-disable-directives-severity=error .",
"fix:eslint": "oxlint --fix --type-aware --report-unused-disable-directives-severity=error ."
},
"dependencies": {
"@hashintel/petrinaut": "workspace:*",
Expand All @@ -19,13 +19,14 @@
"react-dom": "19.2.3"
},
"devDependencies": {
"@local/eslint": "workspace:*",
"@rolldown/plugin-babel": "0.2.1",
"@types/react": "19.2.7",
"@types/react-dom": "19.2.3",
"@typescript/native-preview": "7.0.0-dev.20260309.1",
"@vitejs/plugin-react": "5.1.4",
"@typescript/native-preview": "7.0.0-dev.20260315.1",
"@vitejs/plugin-react": "6.0.1",
"babel-plugin-react-compiler": "1.0.0",
"eslint": "9.39.3",
"vite": "8.0.0-beta.18"
"oxlint": "1.55.0",
"oxlint-tsgolint": "0.17.0",
"vite": "8.0.0"
}
}
8 changes: 8 additions & 0 deletions apps/petrinaut-website/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["//"],
"tasks": {
"lint:eslint": {
"dependsOn": []
}
}
}
17 changes: 12 additions & 5 deletions apps/petrinaut-website/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import react from "@vitejs/plugin-react";
import babel from "@rolldown/plugin-babel";
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
import { defineConfig } from "vite";

/** Petrinaut website dev server and production build config. */
Expand All @@ -13,10 +14,16 @@ export default defineConfig(() => {
},

plugins: [
react({
babel: {
plugins: ["babel-plugin-react-compiler"],
},
react(),
babel({
presets: [
reactCompilerPreset({
target: "19",
compilationMode: "infer",
// @ts-expect-error - panicThreshold is accepted at runtime
panicThreshold: "critical_errors",
}),
],
}),
],
};
Expand Down
Loading
Loading