Skip to content

Commit 6756caa

Browse files
committed
feat: initialize project with eslint, prettier, and ts configuration
0 parents  commit 6756caa

9 files changed

+181
-0
lines changed

.eslintrc.js

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/** @type {import('eslint').Linter.Config} */
2+
module.exports = {
3+
extends: ['@rocketseat/eslint-config/node'],
4+
plugins: ['simple-import-sort'],
5+
overrides: [
6+
{
7+
files: [
8+
'.eslintrc.js',
9+
'tsup.config.js',
10+
'vitest.config.mjs',
11+
'vitest.workspace.mjs',
12+
],
13+
rules: {
14+
'@typescript-eslint/no-require-imports': 'off',
15+
},
16+
},
17+
{
18+
files: ['./src/configs/env.config.ts', './src/container.ts'],
19+
rules: {
20+
'prettier/prettier': [
21+
'error',
22+
{
23+
...require('./prettier.config'),
24+
printWidth: 130,
25+
},
26+
],
27+
},
28+
},
29+
],
30+
rules: {
31+
'prettier/prettier': [
32+
'error',
33+
{
34+
...require('./prettier.config'),
35+
},
36+
],
37+
'simple-import-sort/imports': 'error',
38+
'@typescript-eslint/no-duplicate-enum-values': 'off',
39+
'no-useless-constructor': 'off',
40+
},
41+
};

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.vscode
2+
node_modules
3+
dist
4+
package-lock.json
5+
lib
6+
tmp/*
7+
!tmp/.gitkeep
8+
test-output
9+
.DS_Store

.npmignore

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.git
2+
.vscode
3+
tests
4+
test.*
5+
6+
.editorconfig
7+
.eslintignore
8+
.eslintrc*
9+
.gitignore
10+
.DS_Store
11+
.nvmrc
12+
13+
prettier.config.js
14+
tsup.config.ts
15+
tsconfig.json
16+
vitest.config.ts
17+
18+
src
19+
tmp
20+
test-output
21+
22+
CODE_OF_CONDUCT.md
23+
CONTRIBUTING.md
24+
SECURITY.md

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.14.0

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# MCPKit
2+

package.json

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"name": "mcpkit",
3+
"version": "0.0.1",
4+
"repository": "https://github.com/ribeirogab/mcpkit.git",
5+
"author": "ribeirogab <[email protected]>",
6+
"license": "MIT",
7+
"description": "A toolkit for building MCP servers",
8+
"main": "dist/index.js",
9+
"module": "dist/index.mjs",
10+
"types": "dist/index.d.ts",
11+
"exports": {
12+
".": {
13+
"types": "./dist/index.d.ts",
14+
"import": "./dist/index.mjs",
15+
"require": "./dist/index.js"
16+
}
17+
},
18+
"files": [
19+
"dist",
20+
"README.md"
21+
],
22+
"scripts": {
23+
"build": "tsup",
24+
"publish:npm": "npm run build && npm publish",
25+
"lint": "eslint src/**/*"
26+
},
27+
"keywords": [
28+
"mcp",
29+
"model-context-protocol",
30+
"ai"
31+
],
32+
"eslintConfig": {
33+
"extends": [
34+
"./.eslintrc.js"
35+
]
36+
},
37+
"publishConfig": {
38+
"access": "public"
39+
},
40+
"dependencies": {
41+
"@modelcontextprotocol/sdk": "^1.8.0",
42+
"@types/node": "^22.13.14",
43+
"zod": "^3.24.2",
44+
"zod-to-json-schema": "^3.24.5"
45+
},
46+
"devDependencies": {
47+
"@rocketseat/eslint-config": "2.2.2",
48+
"@typescript-eslint/eslint-plugin": "^8.15.0",
49+
"eslint": "8.57.1",
50+
"eslint-plugin-simple-import-sort": "12.1.1",
51+
"prettier": "3.3.3",
52+
"tsup": "^8.4.0",
53+
"typescript": "^5.8.2"
54+
}
55+
}

prettier.config.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/** @type {import('prettier').Config} */
2+
module.exports = {
3+
printWidth: 80,
4+
tabWidth: 2,
5+
useTabs: false,
6+
semi: true,
7+
singleQuote: true,
8+
quoteProps: 'as-needed',
9+
jsxSingleQuote: false,
10+
trailingComma: 'all',
11+
bracketSpacing: true,
12+
arrowParens: 'always',
13+
endOfLine: 'auto',
14+
bracketSameLine: false,
15+
};

tsconfig.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"display": "Node 22",
4+
"_version": "22.14.0",
5+
6+
"compilerOptions": {
7+
"lib": ["es2023"],
8+
"module": "node16",
9+
"target": "es2022",
10+
"declaration": true,
11+
"outDir": "dist",
12+
"rootDir": "src",
13+
14+
"strict": true,
15+
"esModuleInterop": true,
16+
"skipLibCheck": true,
17+
"moduleResolution": "node16",
18+
"experimentalDecorators": true,
19+
"emitDecoratorMetadata": true
20+
},
21+
"include": ["src/**/*"],
22+
"exclude": ["node_modules", "dist", "**/*.spec.ts", "**/*.test.ts"]
23+
}

tsup.config.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { defineConfig } from 'tsup';
2+
3+
export default defineConfig({
4+
entry: ['src/index.ts'],
5+
format: ['cjs', 'esm'],
6+
dts: true,
7+
outDir: 'dist',
8+
splitting: false,
9+
sourcemap: true,
10+
clean: true,
11+
});

0 commit comments

Comments
 (0)