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

Tidy react code #45

Merged
merged 7 commits into from
Jul 5, 2024
Merged
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
3 changes: 2 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ repos:
- id: check-added-large-files
- id: check-yaml
args: [--allow-multiple-documents]
exclude: ^helmchart/
- id: check-merge-conflict

- repo: local
Expand All @@ -26,7 +27,7 @@ repos:
- id: prettier
name: format js/ts(x) with prettier
language: system
entry: npx prettier gui/config-server-gui/ --write
entry: npx prettier gui/config-server-gui/ --print-width 100 --write
types: [javascript,jsx,ts,tsx]
require_serial: true

Expand Down
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}, "[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[yaml]": {
"editor.defaultFormatter": "ms-kubernetes-tools.vscode-kubernetes-tools",
Expand Down
1 change: 1 addition & 0 deletions gui/config-server-gui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react-dom": "^18.3.1",
"react-icons": "^3.11.0",
"react-scripts": "^5.0.1",
"serve": "^14.2.3",
"typescript": "^4.9.5",
"web-vitals": "^2.1.4"
},
Expand Down
5 changes: 1 addition & 4 deletions gui/config-server-gui/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Config manager for DLS DAQ"
/>
<meta name="description" content="Config manager for DLS DAQ" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand Down
4 changes: 1 addition & 3 deletions gui/config-server-gui/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { render } from "./test-utils";

test("title is displayed", () => {
render(<App />);
const titleText = screen.getByText(
/Read and store configuration for I03 Hyperion/i
);
const titleText = screen.getByText(/Read and store configuration for I03 Hyperion/i);
expect(titleText).toBeInTheDocument();
});
Loading