Add TypeScript SDK scaffolding with CI and linting

This commit is contained in:
Tapan Chugh 2026-02-25 15:03:24 -08:00
commit 7f3184b07b
7 changed files with 4229 additions and 0 deletions

29
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,29 @@
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdk/typescript
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
cache-dependency-path: sdk/typescript/package-lock.json
- run: npm ci
- run: npm run build
- run: npm test
- run: npm run lint

View file

@ -0,0 +1,4 @@
dist
coverage
node_modules
*-lock.*

View file

@ -0,0 +1,20 @@
{
"printWidth": 140,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"bracketSameLine": false,
"proseWrap": "always",
"arrowParens": "avoid",
"overrides": [
{
"files": "**/*.md",
"options": {
"printWidth": 280
}
}
]
}

View file

@ -0,0 +1,19 @@
// @ts-check
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
linterOptions: {
reportUnusedDisableDirectives: false
},
rules: {
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }]
}
},
eslintConfigPrettier
);

4107
sdk/typescript/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
{
"name": "@anthropic/ext-grouping",
"version": "0.1.0",
"description": "MCP Grouping Extension — organize tools, prompts, and resources into named groups",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "tsc",
"test": "vitest run",
"test:watch": "vitest",
"lint": "eslint src/ && prettier --check .",
"format": "prettier --write ."
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.27.0",
"zod": "^3.24.0"
},
"devDependencies": {
"@eslint/js": "^9.0.0",
"@types/node": "^25.3.0",
"eslint": "^9.0.0",
"eslint-config-prettier": "^10.0.0",
"prettier": "^3.0.0",
"tsx": "^4.19.0",
"typescript": "^5.7.0",
"typescript-eslint": "^8.0.0",
"vitest": "^3.0.0"
},
"license": "MIT"
}

View file

@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "ES2022",
"module": "Node16",
"moduleResolution": "Node16",
"declaration": true,
"outDir": "dist",
"rootDir": "src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": ["src"],
"exclude": ["node_modules", "dist", "test", "examples"]
}