Skip to content

Commit 7ccb8e6

Browse files
authored
chore: Upgrade UI vite and tailwind packages (#443)
* chore: Upgrade UI vite and tailwind packages Vite 5.2.0 -> 6.3.5 @vitejs/plugin-basic-ssl 1.2.0 -> 2.0.0 cva: 1.0.0-beta.1 -> 1.0.0-beta.3 focus-trap-react 10.2.3 -> 11.0.3 framer-motion 11.15.0 -> 12.11.0 @tailwindcss/postcss 4.1.6 @tailwindcss/vite 4.1.6 tailwind 3.4.17 -> 4.1.6 tailwind-merge 2.5.5 -> 3.3.0 Minor updates: @headlessui/react 2.2.2 -> 2.2.3 @types/react 19.1.3 -> 19.1.4 @types/react-dom 19.1.3 -> 19.1.5 @typescript-eslint/eslint-plugin 8.32.0 -> 8.32.1 @typescript-eslint/parser 8.32.0 -> 8.32.1 react-simple-keyboard 3.8.71 -> 3.8.72 The new version of vite required an Node 22.15 (since that's current LTS and node 21.x is EOL) The changes to css due to the tailwind 3 to 4 upgrade were done following [the upgrade guide](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3) Done in this order (important): `shadow-sm` -> `shadow-xs` `shadow` -> `shadown-sm` `rounded` -> `rounded-sm` `outline-none` -> `outline-hidden` `32rem_32rem_at_center` -> `center_at_32rem_32rem` (revised order of gradient props) `ring-1 ring-black ring-opacity-5` -> `ring-1 ring-black/50` `flex-shrink-0` -> `shrink-0` `flex-grow-0` -> `grow-0` `outline outline-1` -> `outline-1` ALSO removed the **extra** `opacity-0` on the video element (trips up latest tailwind causing the video to be invisible) FocusTrap is now not exported as the default, so change those imports headlessui's Menu completely changed, so upgrade to the new syntax which necessitated a reorganization of the Header.tsx to enable the "menu" to still work * Update eslint config and fix errors
1 parent 340baba commit 7ccb8e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2057
-1432
lines changed

ui/.eslintrc.cjs

Lines changed: 0 additions & 66 deletions
This file was deleted.

ui/eslint.config.cjs

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
const {
2+
defineConfig,
3+
globalIgnores,
4+
} = require("eslint/config");
5+
6+
const globals = require("globals");
7+
8+
const {
9+
fixupConfigRules,
10+
} = require("@eslint/compat");
11+
12+
const tsParser = require("@typescript-eslint/parser");
13+
const reactRefresh = require("eslint-plugin-react-refresh");
14+
const js = require("@eslint/js");
15+
16+
const {
17+
FlatCompat,
18+
} = require("@eslint/eslintrc");
19+
20+
const compat = new FlatCompat({
21+
baseDirectory: __dirname,
22+
recommendedConfig: js.configs.recommended,
23+
allConfig: js.configs.all
24+
});
25+
26+
module.exports = defineConfig([{
27+
languageOptions: {
28+
globals: {
29+
...globals.browser,
30+
},
31+
32+
parser: tsParser,
33+
ecmaVersion: "latest",
34+
sourceType: "module",
35+
36+
parserOptions: {
37+
project: ["./tsconfig.json", "./tsconfig.node.json"],
38+
tsconfigRootDir: __dirname,
39+
ecmaFeatures: {
40+
jsx: true
41+
}
42+
},
43+
},
44+
45+
extends: fixupConfigRules(compat.extends(
46+
"eslint:recommended",
47+
"plugin:@typescript-eslint/recommended",
48+
"plugin:@typescript-eslint/stylistic",
49+
"plugin:react-hooks/recommended",
50+
"plugin:react/recommended",
51+
"plugin:react/jsx-runtime",
52+
"plugin:import/recommended",
53+
"prettier",
54+
)),
55+
56+
plugins: {
57+
"react-refresh": reactRefresh,
58+
},
59+
60+
rules: {
61+
"react-refresh/only-export-components": ["warn", {
62+
allowConstantExport: true,
63+
}],
64+
65+
"import/order": ["error", {
66+
groups: ["builtin", "external", "internal", "parent", "sibling"],
67+
"newlines-between": "always",
68+
}],
69+
},
70+
71+
settings: {
72+
"react": {
73+
"version": "detect"
74+
},
75+
"import/resolver": {
76+
alias: {
77+
map: [
78+
["@components", "./src/components"],
79+
["@routes", "./src/routes"],
80+
["@assets", "./src/assets"],
81+
["@", "./src"],
82+
],
83+
84+
extensions: [".ts", ".tsx", ".js", ".jsx", ".json"],
85+
},
86+
},
87+
},
88+
}, globalIgnores([
89+
"**/dist",
90+
"**/.eslintrc.cjs",
91+
"**/tailwind.config.js",
92+
"**/postcss.config.js",
93+
])]);

0 commit comments

Comments
 (0)