Skip to content

Commit 7fcd5d6

Browse files
poltorakSzymon.Poltorak
andauthored
feat(): adopt official ESLint MCP; remove ds/angular-eslint tool (#9)
Co-authored-by: Szymon.Poltorak <szymon.poltorak@push-based.io>
1 parent 4a09b14 commit 7fcd5d6

File tree

19 files changed

+3110
-885
lines changed

19 files changed

+3110
-885
lines changed

.cursor/flows/ds-refactoring-flow/04-validate-changes.mdc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ This contains the list of available component contracts.
2121

2222
Now, follow these steps:
2323

24-
1. Use the `lint-changes` tool to perform static code analysis on the refactored files. Call the tool like this:
25-
<tool_call>lint-changes {{REFACTORED_FILES}}</tool_call>
26-
27-
If there are any errors reported by the lint tool, list them and ask the user what to do. Wait for the user's response before proceeding.
24+
1. Fix eslint issues in {{REFACTORED_FILES}} using `lint-files`. DO NOT go to next step until lint errors are fixed. If there are unfixable errors ask user what to do.
2825

2926
2. Use the `build_component_contract` tool to capture the refactored state of the components:
3027
<tool_call>build_component_contract {{REFACTORED_FILES}}</tool_call>

.cursor/mcp.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@
77
"command": "node",
88
"args": [
99
"./packages/angular-mcp/dist/main.js",
10-
"--workspaceRoot=root/path/to/workspace",
10+
"--workspaceRoot=/home/spoltorak/projects/x-mcp",
1111
"--ds.storybookDocsRoot=packages/minimal-repo/packages/design-system/storybook-host-app/src/components",
1212
"--ds.deprecatedCssClassesPath=packages/minimal-repo/packages/design-system/component-options.js",
1313
"--ds.uiRoot=packages/minimal-repo/packages/design-system/ui"
1414
]
15+
},
16+
"ESLint": {
17+
"type": "stdio",
18+
"command": "npx",
19+
"args": ["@eslint/mcp@latest"]
1520
}
1621
}
1722
}

.cursor/mcp.json.example

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"mcpServers": {
3+
"nx-mcp": {
4+
"url": "http://localhost:9665/sse"
5+
},
6+
"angular-toolkit-mcp": {
7+
"command": "node",
8+
"args": [
9+
"/absolute/path/to/angular-mcp-server/packages/angular-mcp-server/dist/index.js",
10+
"--workspaceRoot=/absolute/path/to/your/angular/workspace",
11+
"--ds.storybookDocsRoot=relative/path/to/storybook/docs",
12+
"--ds.deprecatedCssClassesPath=relative/path/to/component-options.js",
13+
"--ds.uiRoot=relative/path/to/ui/components"
14+
]
15+
},
16+
"ESLint": {
17+
"type": "stdio",
18+
"command": "npx",
19+
"args": ["@eslint/mcp@latest"]
20+
}
21+
}
22+
}

.cursor/rules/04-validate-changes.mdc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ This contains the list of available component contracts.
2121

2222
Now, follow these steps:
2323

24-
1. Use the `lint-changes` tool to perform static code analysis on the refactored files. Call the tool like this:
25-
<tool_call>lint-changes {{REFACTORED_FILES}}</tool_call>
26-
27-
If there are any errors reported by the lint tool, list them and ask the user what to do. Wait for the user's response before proceeding.
24+
1. Fix eslint issues in {{REFACTORED_FILES}} using `lint-files`. DO NOT go to next step until lint errors are fixed. If there are unfixable errors ask user what to do.
2825

2926
2. Use the `build_component_contract` tool to capture the refactored state of the components:
3027
<tool_call>build_component_contract {{REFACTORED_FILES}}</tool_call>

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,5 @@ vitest.config.*.timestamp*
4949
.code-pushup
5050

5151
.cursor/rules/nx-rules.mdc
52+
.cursor/mcp.json
5253
.github/instructions/nx.instructions.md

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,12 @@ Add the server to your MCP client configuration (e.g., Claude Desktop, Cursor, C
4747

4848
#### For Cursor (`.cursor/mcp.json` or MCP settings):
4949

50-
Open the project you working with and register the mcp with next parameters:
50+
Copy `.cursor/mcp.json.example` to the project you're working on. Copied file should be: `.cursor/mcp.json` and update `angular-toolkit-mcp` values accordingly:
5151

5252
```json
5353
{
5454
"mcpServers": {
55+
...(other servers)...
5556
"angular-toolkit-mcp": {
5657
"command": "node",
5758
"args": [
@@ -66,6 +67,8 @@ Open the project you working with and register the mcp with next parameters:
6667
}
6768
```
6869

70+
> **Note**: The example file contains configuration for `ESLint` official MCP which is required for the toolkit to work properly.
71+
6972
### Configuration Parameters
7073

7174
#### Required Parameters

0 commit comments

Comments
 (0)