Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
dist/
.git/
*.log
.env
.env.*
chart/
src/shared/
84 changes: 84 additions & 0 deletions .eslintrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
import importPlugin from 'eslint-plugin-import';

export default [
{
files: ['**/*.ts', '**/*.js', '**/*.mjs'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
parser: tsParser,
parserOptions: {
project: './tsconfig.json',
},
},
plugins: {
'@typescript-eslint': tsPlugin,
'import': importPlugin,
},
rules: {
// TypeScript specific rules
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/prefer-const': 'error',
'@typescript-eslint/no-var-requires': 'error',

// Import/Export rules
'import/order': [
'error',
{
groups: [
'builtin',
'external',
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'never',
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'always',
ts: 'never',
},
],

// General JavaScript rules
'no-console': 'off', // Allow console for logging in MCP server
'no-unused-vars': 'off', // Use TypeScript version instead
'prefer-const': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-arrow-callback': 'error',
'arrow-spacing': 'error',
'prefer-template': 'error',

// Async/await preferences (per CLAUDE.md)
'prefer-promise-reject-errors': 'error',
'no-return-await': 'error',

// Naming conventions (per CLAUDE.md)
'camelcase': ['error', { properties: 'always' }],

// Code style (handled by Prettier, but some logical rules)
'eqeqeq': ['error', 'always'],
'curly': ['error', 'all'],
'brace-style': ['error', '1tbs'],
},
},
{
files: ['**/*.js', '**/*.mjs'],
rules: {
// Disable TypeScript-specific rules for JS files
'@typescript-eslint/no-var-requires': 'off',
},
},
];
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
node_modules
.env
.env
.eslintcache
15 changes: 15 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- Watch mode: `npm run watch` - Watches for changes and rebuilds automatically
- Run server: `npm run start` - Starts the MCP server using stdio transport
- Prepare release: `npm run prepare` - Builds the project for publishing
- Lint: `npm run lint` - Runs ESLint to check code quality
- Lint Fix: `npm run lint:fix` - Runs ESLint with automatic fixing
- Lint Check: `npm run lint:check` - Runs ESLint with zero warnings allowed

## Code Style Guidelines

Expand All @@ -19,3 +22,15 @@
- Follow camelCase for variables/functions, PascalCase for types/classes, UPPER_CASE for constants
- Handle errors with try/catch blocks and provide clear error messages
- Use consistent indentation (2 spaces) and trailing commas in multi-line objects

## Linting

This project uses ESLint for code linting with TypeScript support. The configuration enforces:

- TypeScript best practices and type safety
- Import/export ordering and module resolution
- Async/await patterns over promises
- Consistent naming conventions
- Integration with Prettier for formatting

ESLint is configured to work with the project's ES module setup and `.js` extension requirements for imports.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
"watch:http": "tsx watch src/index.ts http",
"start": "node dist/index.js stdio",
"start:http": "node dist/index.js http",
"inspector": "npx @modelcontextprotocol/inspector"
"inspector": "npx @modelcontextprotocol/inspector",
"lint": "eslint src --ext .ts,.js,.mjs",
"lint:fix": "eslint src --ext .ts,.js,.mjs --fix",
"lint:check": "eslint src --ext .ts,.js,.mjs --max-warnings 0"
},
"dependencies": {
"@linear/sdk": "^56.0.0",
Expand All @@ -43,7 +46,11 @@
"devDependencies": {
"@types/express": "^5.0.3",
"@types/node": "^22.16.4",
"@typescript-eslint/eslint-plugin": "^8.8.0",
"@typescript-eslint/parser": "^8.8.0",
"ai": "^5.0.17",
"eslint": "^9.12.0",
"eslint-plugin-import": "^2.31.0",
"prettier": "^3.6.2",
"shx": "^0.4.0",
"tsx": "^4.20.4",
Expand Down