Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve vite experience #17482

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions packages/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"eslint-plugin-local-rules": "^3.0.2",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"typescript-eslint": "^8.23.0"
}
}
3 changes: 3 additions & 0 deletions packages/eslint/src/reactConfig.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import pluginReact from 'eslint-plugin-react';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import reactRefresh from 'eslint-plugin-react-refresh';

export const reactConfig = [
// React
pluginReact.configs.flat.recommended,
reactRefresh.configs.recommended,
{
languageOptions: {
...pluginReact.configs.flat.recommended.languageOptions,
Expand All @@ -29,6 +31,7 @@ export const reactConfig = [
...pluginReactHooks.configs.recommended.rules,
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-refresh/only-export-components': 'warn',
},
},
];
1 change: 1 addition & 0 deletions packages/suite-web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ if (typeof window !== 'undefined' && typeof globalThis === 'undefined') {

export default defineConfig({
root: './src/static',
cacheDir: resolve(__dirname, '../../node_modules/.vite'),
base: assetPrefix,
// Use suite-data/files as the public directory
publicDir: resolve(__dirname, '../suite-data/files'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ pdfmake
vite-plugin-wasm
vite
vm-browserify
eslint-plugin-react-refresh
10 changes: 10 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11976,6 +11976,7 @@ __metadata:
eslint-plugin-local-rules: "npm:^3.0.2"
eslint-plugin-react: "npm:^7.37.4"
eslint-plugin-react-hooks: "npm:^5.1.0"
eslint-plugin-react-refresh: "npm:^0.4.19"
typescript-eslint: "npm:^8.23.0"
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -22196,6 +22197,15 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-react-refresh@npm:^0.4.19":
version: 0.4.19
resolution: "eslint-plugin-react-refresh@npm:0.4.19"
peerDependencies:
eslint: ">=8.40"
checksum: 10/4a17088da4da6e1efe4a5bb76bcf917c82d271d8c327a6b906a4ac5623bf7b0a8a990eca78c2e04267ede9095854442ff08d7e1484baa258827a6dc3452ab892
languageName: node
linkType: hard

"eslint-plugin-react@npm:^7.37.4":
version: 7.37.4
resolution: "eslint-plugin-react@npm:7.37.4"
Expand Down
Loading