mirror of
https://github.com/hanzoai/cd-ui.git
synced 2026-10-30 20:42:45 +00:00
* chore: fix Rules-of-React violations for React Compiler readiness Add eslint-plugin-react-hooks v7 (recommended-latest) and fix all error-level Rules-of-React findings so the React Compiler can optimize the component library. The healthcheck reports 100% of components compilable; these fixes clear the 34 ESLint errors across the src and v2 component trees: - refs: stop accessing ref.current during render (incl. the react-form compat shim, whose public ref-forwarding API is preserved) - set-state-in-effect: convert to derived state or restructure effects - immutability: clone-before-mutate; stop mutating props/state - rules-of-hooks: hoist conditional hook calls to top level All 47 unit tests pass; behavior is preserved. Signed-off-by: Jonathan Winters <[email protected]> * chore: resolve react-hooks deps from public npm registry The eslint-plugin-react-hooks@7 dependency subtree was locked to an internal mirror, which the public CI runner can't reach (ETIMEDOUT). Rewrite the 21 affected resolved URLs to registry.yarnpkg.com. Signed-off-by: Jonathan Winters <[email protected]> * useKeybinding -> registerKeybinding Signed-off-by: Jonathan Winters <[email protected]> * chore: fix Rules-of-React refs violations from registerKeybinding rename The useKeybinding->registerKeybinding rename turned hook calls into plain function calls in the render body; since registerKeybinding takes ref targets, the new react-hooks/refs lint flagged them. Move the calls into useEffect (registration is a side effect) in sliding-panel and the v2 autocomplete. In the v1 autocomplete, the flagged value is a forwarded callback ref, not a render-time read, so suppress that one with a comment. Also dedupe pnpm-lock.yaml. Signed-off-by: Jonathan Winters <[email protected]> --------- Signed-off-by: Jonathan Winters <[email protected]>
103 lines
3.3 KiB
JSON
103 lines
3.3 KiB
JSON
{
|
|
"name": "argo-ui",
|
|
"version": "1.0.0",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"packageManager": "[email protected]",
|
|
"license": "Apache-2.0",
|
|
"files": [
|
|
"src",
|
|
"v2"
|
|
],
|
|
"scripts": {
|
|
"lint": "eslint --ext .tsx .",
|
|
"deduplicate": "pnpm dedupe",
|
|
"test": "jest",
|
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
"preinstall": "npx only-allow pnpm",
|
|
"utils:icons": "rm -f src/assets/fonts/* && node ./scripts/icons/generator.js",
|
|
"start": "storybook dev -p 6006",
|
|
"build": "storybook build -o ./dist/storybook",
|
|
"start-v2": "storybook dev -c ./v2/.storybook -p 6006",
|
|
"build-v2": "storybook build -o ./dist/storybook-v2 -c ./v2/.storybook"
|
|
},
|
|
"dependencies": {
|
|
"@fortawesome/fontawesome-free": "^6.2.1",
|
|
"@tippy.js/react": "^3.1.1",
|
|
"classnames": "^2.2.6",
|
|
"core-js": "^3.32.1",
|
|
"downshift": "^9.3.2",
|
|
"foundation-sites": "^6.4.3",
|
|
"history": "^4.10.1",
|
|
"minimatch": "^9.0.7",
|
|
"prop-types": "^15.8.1",
|
|
"react-toastify": "9.0.3",
|
|
"rxjs": "^7.8.1",
|
|
"typescript": "^4.9.5",
|
|
"uuid": "^9.0.0",
|
|
"xterm": "^4.19.0",
|
|
"xterm-addon-fit": "^0.5.0"
|
|
},
|
|
"peerDependencies": {
|
|
"@types/react": "^19.0.0",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"react-router-dom": "^5.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.21.3",
|
|
"@storybook/addon-actions": "^8.6.17",
|
|
"@storybook/addon-controls": "^8.6.17",
|
|
"@storybook/addon-essentials": "^8.6.17",
|
|
"@storybook/addon-links": "^8.6.17",
|
|
"@storybook/addon-webpack5-compiler-swc": "^1.0.6",
|
|
"@storybook/react-webpack5": "^8.6.17",
|
|
"@storybook/test": "^8.6.17",
|
|
"@testing-library/dom": "^10.4.1",
|
|
"@testing-library/jest-dom": "^6.9.1",
|
|
"@testing-library/react": "^16.3.2",
|
|
"@testing-library/user-event": "^14.6.1",
|
|
"@types/deep-equal": "^1.0.1",
|
|
"@types/history": "^4.7.8",
|
|
"@types/jest": "^26.0.15",
|
|
"@types/node": "^18.15.3",
|
|
"@types/prop-types": "^15.7.5",
|
|
"@types/react": "^19.0.0",
|
|
"@types/react-dom": "^19.0.0",
|
|
"@types/react-router-dom": "^5.0.0",
|
|
"@types/uuid": "^9.0.3",
|
|
"@typescript-eslint/eslint-plugin": "^5.36.1",
|
|
"@typescript-eslint/parser": "^5.36.1",
|
|
"babel-loader": "^8.2.5",
|
|
"copy-webpack-plugin": "^4.3.1",
|
|
"css-loader": "^3.6.0",
|
|
"eslint": "^8.23.0",
|
|
"eslint-plugin-react": "^7.31.1",
|
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
"glob": "^8.0.3",
|
|
"identity-obj-proxy": "^3.0.0",
|
|
"jest": "^26.6.3",
|
|
"raw-loader": "^4.0.2",
|
|
"react": "^19.0.0",
|
|
"react-dom": "^19.0.0",
|
|
"react-router-dom": "^5.0.0",
|
|
"sass": "^1.55.0",
|
|
"sass-loader": "^v10.1.0",
|
|
"storybook": "^8.6.17",
|
|
"style-loader": "^2.0.0",
|
|
"ts-jest": "^26.5.6",
|
|
"ts-node": "^10.9.1",
|
|
"webfonts-generator": "^0.4.0",
|
|
"webpack": "5"
|
|
},
|
|
"resolutions": {
|
|
"@types/react": "^19.0.0",
|
|
"@types/node": "14.11.2"
|
|
},
|
|
"pnpm": {
|
|
"overrides": {
|
|
"ttf2woff2": "5.0.0"
|
|
}
|
|
}
|
|
}
|