Skip to content

Commit 65fc6d0

Browse files
prettier-fix, add contribution guidelines
1 parent 834eb0c commit 65fc6d0

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Thanks for your interest in contributing! This guide explains how to get involve
1212
## Development Process & Pull Requests
1313

1414
1. Create a new branch for your changes
15-
2. Make your changes following existing code style and conventions
16-
3. Test changes locally
15+
2. Make your changes following existing code style and conventions. You can run `npm run prettier-check` and `npm run prettier-fix` as applicable.
16+
3. Test changes locally by running `npm test`
1717
4. Update documentation as needed
1818
5. Use clear commit messages explaining your changes
1919
6. Verify all changes work as expected

client/src/components/__tests__/Sidebar.test.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,9 @@ describe("Sidebar Environment Variables", () => {
321321

322322
openConfigSection();
323323

324-
const timeoutInput = screen.getByTestId("MCP_SERVER_REQUEST_TIMEOUT-input");
324+
const timeoutInput = screen.getByTestId(
325+
"MCP_SERVER_REQUEST_TIMEOUT-input",
326+
);
325327
fireEvent.change(timeoutInput, { target: { value: "5000" } });
326328

327329
expect(setConfig).toHaveBeenCalledWith({
@@ -338,7 +340,9 @@ describe("Sidebar Environment Variables", () => {
338340

339341
openConfigSection();
340342

341-
const timeoutInput = screen.getByTestId("MCP_SERVER_REQUEST_TIMEOUT-input");
343+
const timeoutInput = screen.getByTestId(
344+
"MCP_SERVER_REQUEST_TIMEOUT-input",
345+
);
342346
fireEvent.change(timeoutInput, { target: { value: "abc1" } });
343347

344348
expect(setConfig).toHaveBeenCalledWith({
@@ -351,22 +355,35 @@ describe("Sidebar Environment Variables", () => {
351355

352356
it("should maintain configuration state after multiple updates", () => {
353357
const setConfig = jest.fn();
354-
const { rerender } = renderSidebar({ config: DEFAULT_INSPECTOR_CONFIG, setConfig });
358+
const { rerender } = renderSidebar({
359+
config: DEFAULT_INSPECTOR_CONFIG,
360+
setConfig,
361+
});
355362

356363
openConfigSection();
357364

358365
// First update
359-
const timeoutInput = screen.getByTestId("MCP_SERVER_REQUEST_TIMEOUT-input");
366+
const timeoutInput = screen.getByTestId(
367+
"MCP_SERVER_REQUEST_TIMEOUT-input",
368+
);
360369
fireEvent.change(timeoutInput, { target: { value: "5000" } });
361370

362371
// Get the updated config from the first setConfig call
363372
const updatedConfig = setConfig.mock.calls[0][0] as InspectorConfig;
364373

365374
// Rerender with the updated config
366-
rerender(<Sidebar {...defaultProps} config={updatedConfig} setConfig={setConfig} />);
375+
rerender(
376+
<Sidebar
377+
{...defaultProps}
378+
config={updatedConfig}
379+
setConfig={setConfig}
380+
/>,
381+
);
367382

368383
// Second update
369-
const updatedTimeoutInput = screen.getByTestId("MCP_SERVER_REQUEST_TIMEOUT-input");
384+
const updatedTimeoutInput = screen.getByTestId(
385+
"MCP_SERVER_REQUEST_TIMEOUT-input",
386+
);
370387
fireEvent.change(updatedTimeoutInput, { target: { value: "3000" } });
371388

372389
// Verify the final state matches what we expect

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"dev": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev\"",
2525
"dev:windows": "concurrently \"cd client && npm run dev\" \"cd server && npm run dev:windows",
26-
"test": "cd client && npm test",
26+
"test": "npm run prettier-check && cd client && npm test",
2727
"build-server": "cd server && npm run build",
2828
"build-client": "cd client && npm run build",
2929
"build": "npm run build-server && npm run build-client",
@@ -32,6 +32,7 @@
3232
"start": "node ./bin/cli.js",
3333
"prepare": "npm run build",
3434
"prettier-fix": "prettier --write .",
35+
"prettier-check": "prettier --check .",
3536
"publish-all": "npm publish --workspaces --access public && npm publish --access public"
3637
},
3738
"dependencies": {

0 commit comments

Comments
 (0)