Skip to content

Commit 2c212b2

Browse files
authored
feat: add configuration files for Prettier and EditorConfig (#156)
Having `editorconfig` and `prettier` in the project automatically enforce consistent code formatting and style across all developers and files. This eliminates debates over style, reduces errors, and keeps the codebase clean and readable. This pull request introduces configuration files for `editorconfig` and `prettier`. The `.editorconfig` file sets basic editor settings like using 2-space indents and ensuring a consistent line ending style, so everyone's editor behaves the same way when working on files. The `.prettierrc.json` config apply specific formatting rules such as; - using semicolons - trailing commas for ES5 compatibility, - keeping brackets on the same line - printWidth is set very high (800) which effectively disables line wrapping. Also with `.prettierignore` config we skip formatting certain directories and files. Together, these files ensure that all code contributed to the project looks consistent and adheres to a predefined style. ## GitHub issue number Fixes #41 ## **Associated Risks** None ## ✅ **PR Checklist** - [x] **I have read the [contribution guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)** - [x] **I have read the [code of conduct guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)** - [x] Title of the pull request is clear and informative. - [x] 👌 Code hygiene - [x] 🔭 Telemetry added, updated, or N/A - [x] 📄 Documentation added, updated, or N/A - [x] 🛡️ Automated tests added, or N/A ## 🧪 **How did you test it?** Run `npm run format` at the root of the repo
1 parent 293c008 commit 2c212b2

46 files changed

Lines changed: 1249 additions & 1880 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.azuredevops/pipelines/release.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ schedules:
1010
jobs:
1111
- job: ReleaseLatest
1212
pool:
13-
vmImage: 'windows-latest'
13+
vmImage: "windows-latest"
1414

1515
steps:
1616
- task: UseNode@1
1717
inputs:
18-
version: '20'
18+
version: "20"
1919
checkLatest: false
2020
retryCountOnDownloadFails: 2
2121

@@ -26,24 +26,24 @@ jobs:
2626

2727
- task: Npm@1
2828
inputs:
29-
command: 'ci'
29+
command: "ci"
3030
displayName: Install clean dependencies
3131

3232
- task: Npm@1
3333
inputs:
34-
command: 'custom'
35-
customCommand: 'run build'
34+
command: "custom"
35+
customCommand: "run build"
3636
displayName: Build the project
3737

3838
- task: EsrpCodeSigning@1
39-
displayName: 'Sign Binaries'
39+
displayName: "Sign Binaries"
4040
inputs:
41-
ConnectedServiceName: 'ESRP Service'
42-
FolderPath: '$(Build.ArtifactStagingDirectory)'
41+
ConnectedServiceName: "ESRP Service"
42+
FolderPath: "$(Build.ArtifactStagingDirectory)"
4343
Pattern: |
4444
**/*.js
4545
**/*.ts
46-
signConfigType: 'inlineSignParams'
46+
signConfigType: "inlineSignParams"
4747
inlineOperation: |
4848
[
4949
{
@@ -67,11 +67,11 @@ jobs:
6767
"ToolVersion": "6.2.9304.0"
6868
}
6969
]
70-
SessionTimeout: '60'
71-
MaxConcurrency: '10'
70+
SessionTimeout: "60"
71+
MaxConcurrency: "10"
7272

7373
- task: Npm@1
7474
inputs:
75-
command: 'custom'
76-
customCommand: 'publish --access public --registry=https://registry.npmjs.org/'
77-
displayName: Publish package to public npmjs under @azure-devops org scope
75+
command: "custom"
76+
customCommand: "publish --access public --registry=https://registry.npmjs.org/"
77+
displayName: Publish package to public npmjs under @azure-devops org scope

.devcontainer/devcontainer.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,10 @@
1414
"postCreateCommand": "rm -f .npmrc && npm install && npm install -g . ; az login --use-device-code",
1515
"customizations": {
1616
"codespaces": {
17-
"openFiles": [
18-
"CONTRIBUTING.md"
19-
]
17+
"openFiles": ["CONTRIBUTING.md"]
2018
},
2119
"vscode": {
22-
"extensions": [
23-
"ms-azuretools.vscode-docker",
24-
"GitHub.copilot",
25-
"dbaeumer.vscode-eslint",
26-
"esbenp.prettier-vscode",
27-
"ms-vscode.vscode-typescript-next"
28-
]
20+
"extensions": ["ms-azuretools.vscode-docker", "EditorConfig.EditorConfig", "GitHub.copilot", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "ms-vscode.vscode-typescript-next"]
2921
}
3022
},
3123
"remoteUser": "node"

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Ensure consistent line endings across all platforms
2+
* text=auto eol=lf
3+
4+
# Explicitly set line endings for specific file types
5+
*.ts text eol=lf
6+
*.js text eol=lf
7+
*.json text eol=lf
8+
*.md text eol=lf
9+
*.yml text eol=lf
10+
*.yaml text eol=lf
11+
*.mjs text eol=lf
12+
*.cjs text eol=lf
13+
14+
# Binary files should be left untouched
15+
*.png binary
16+
*.jpg binary
17+
*.jpeg binary
18+
*.gif binary
19+
*.ico binary
20+
*.svg binary

.github/ISSUE_TEMPLATE/JitAccess.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: "JIT Request"
44
labels: ["jit"]
55
assignees:
66
- gimsvc_microsoft
7-
-
7+
-
88
body:
99
- type: markdown
1010
attributes:

.github/ISSUE_TEMPLATE/NewTool.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,32 @@
22
name: Add new tool(s)
33
about: Use this template to leverage AI to add the tools you want
44
labels: enhancement, feature-request
5-
65
---
76

8-
Replace the content with your actual issue making sure to keep similar style so that GitHub Copilot can generate this change for you!
9-
-------------------------------------------------------------------------------------------------------------------------------------
7+
## Replace the content with your actual issue making sure to keep similar style so that GitHub Copilot can generate this change for you!
8+
109
# Summary
10+
1111
Implement two new tools that integrate with Azure DevOps APIs to enable search capabilities.
1212

1313
# Tools
14+
1415
Develop the following tools with full parameter support, including optional ones:
1516

1617
## `search_wiki`: Search Azure DevOps Wikis for relevant content.
18+
1719
Endpoint: POST https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/wikisearchresults?api-version=7.2-preview.1
1820

1921
## `search_code`: Search Azure DevOps Repos for relevant code results.
22+
2023
Endpoint: POST https://almsearch.dev.azure.com/{organization}/{project}/_apis/search/codesearchresults?api-version=7.2-preview.1
2124

2225
# Rules
26+
2327
1. Adhere strictly to existing project standards and coding conventions.
2428
2. Ensure each tool exposes all API parameters (required and optional).
2529
3. Use the official [Azure DevOps Node API](https://github.com/microsoft/azure-devops-node-api) to interact with the APIs.
2630

2731
# Special treat
32+
2833
If you follow the rules, you'll get candy!

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ _Replace_ by description of the work done
33
## GitHub issue number
44

55
## **Associated Risks**
6+
67
_Replace_ by possible risks this pull request can bring you might have thought of
78

89
## **PR Checklist**
@@ -16,4 +17,5 @@ _Replace_ by possible risks this pull request can bring you might have thought o
1617
- [ ] 🛡️ Automated tests added, or N/A
1718

1819
## 🧪 **How did you test it?**
19-
_Replace_ with use cases tested and models used
20+
21+
_Replace_ with use cases tested and models used

.github/acl/access.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,23 @@ resource: repository
66
where:
77
configuration:
88
manageAccess:
9-
- member: Novaes
10-
role: Maintain
11-
- member: danhellem
12-
role: Maintain
13-
- member: aaudzei
14-
role: Maintain
15-
- member: kboom
16-
role: Maintain
17-
- member: skmanoj
18-
role: Write
19-
- member: KathanS
20-
role: Write
21-
- member: vinayakmsft
22-
role: Write
23-
- member: nikolapeja6
24-
role: Write
25-
- member: egor-bryzgalov
26-
role: Write
27-
- member: polatengin
28-
role: Write
9+
- member: Novaes
10+
role: Maintain
11+
- member: danhellem
12+
role: Maintain
13+
- member: aaudzei
14+
role: Maintain
15+
- member: kboom
16+
role: Maintain
17+
- member: skmanoj
18+
role: Write
19+
- member: KathanS
20+
role: Write
21+
- member: vinayakmsft
22+
role: Write
23+
- member: nikolapeja6
24+
role: Write
25+
- member: egor-bryzgalov
26+
role: Write
27+
- member: polatengin
28+
role: Write

.github/copilot-instructions.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
# Context
2+
23
Act like an intelligent coding assistant, who helps test and author tools, prompts and resources for the Azure DevOps MCP server. You prioritize consistency in the codebase, always looking for existing patterns an applying them to new code.
34

45
If the user clearly intends to use a tool, do it.
56
If the user wants to author a new one, help them.
67

78
## Using MCP tools
9+
810
If the user intent relates to Azure DevOps, make sure to prioritize Azure DevOps MCP server tools.
911

1012
## Adding new tools
13+
1114
When adding new tool, always prioritize using an Azure DevOps Typescript client that corresponds the the given Azure DevOps API.
1215
Only if the client or client method is not available, interact with the API directly.
1316
The tools are located in the `src/tools.ts` file.
1417

1518
## Adding new prompts
19+
1620
Ensure the instructions for the language model are clear and concise so that the language model can follow them reliably.
1721
The prompts are located in the `src/prompts.ts` file.

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ updates:
66
interval: "daily"
77
open-pull-requests-limit: 2
88
commit-message:
9-
prefix: "[dependencies]"
9+
prefix: "[dependencies]"

0 commit comments

Comments
 (0)