Skip to content

Commit f485c3c

Browse files
fix(mcp): return correct lines on typescript errors
1 parent 0732dd6 commit f485c3c

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# syntax=docker/dockerfile:1
2+
FROM debian:bookworm-slim AS stainless
3+
4+
RUN apt-get update && apt-get install -y \
5+
nodejs \
6+
npm \
7+
yarnpkg \
8+
&& apt-get clean autoclean
9+
10+
# Ensure UTF-8 encoding
11+
ENV LANG=C.UTF-8
12+
ENV LC_ALL=C.UTF-8
13+
14+
# Yarn
15+
RUN ln -sf /usr/bin/yarnpkg /usr/bin/yarn
16+
17+
WORKDIR /workspace
18+
19+
COPY package.json yarn.lock /workspace/
20+
21+
RUN yarn install
22+
23+
COPY . /workspace

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint', 'unused-imports', 'prettier'],
4+
rules: {
5+
'no-unused-vars': 'off',
6+
'prettier/prettier': 'error',
7+
'unused-imports/no-unused-imports': 'error',
8+
},
9+
root: true,
10+
};

jest.setup.ts

Whitespace-only changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* This file polyfills the global `File` object for you if it's not already defined
3+
* when running on Node.js
4+
*
5+
* This is only needed on Node.js v18 & v19. Newer versions already define `File`
6+
* as a global.
7+
*/
8+
9+
// @ts-ignore
10+
type nodeBuffer = typeof import('node:buffer');
11+
declare const File: typeof globalThis extends { File: unknown } ? (typeof globalThis)['File']
12+
: nodeBuffer extends { File: unknown } ? nodeBuffer['File']
13+
: any;
14+
export {};
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* This file polyfills the global `File` object for you if it's not already defined
3+
* when running on Node.js
4+
*
5+
* This is only needed on Node.js v18 & v19. Newer versions already define `File`
6+
* as a global.
7+
*/
8+
9+
import './file.node.js';

0 commit comments

Comments
 (0)