Created
March 8, 2026 01:44
-
-
Save Samu31Nd/5dca956f7453022f0c18870352c3aaf9 to your computer and use it in GitHub Desktop.
Configuration for Node.Js + Typescript optimized for Neo vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** @type {import('ts-jest').JestConfigWithTsJest} */ | |
| export default { | |
| // Usamos el preset específico para ESM | |
| preset: 'ts-jest/presets/default-esm', | |
| testEnvironment: 'node', | |
| // Esto es vital para que Jest no se confunda con las extensiones .js en archivos .ts | |
| moduleNameMapper: { | |
| '^(\\.{1,2}/.*)\\.js$': '$1', | |
| }, | |
| transform: { | |
| '^.+\\.tsx?$': [ | |
| 'ts-jest', | |
| { | |
| useESM: true, | |
| }, | |
| ], | |
| }, | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "watch": ["src"], | |
| "ext": ".ts,.js", | |
| "ignore": [], | |
| "exec": "npx tsx ./src/app.ts" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "example", | |
| "version": "0.0.1", | |
| "type": "module", | |
| "description": "example app", | |
| "main": "app.ts", | |
| "directories": { | |
| "test": "tests" | |
| }, | |
| "scripts": { | |
| "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js", | |
| "dev": "nodemon", | |
| "build": "rimraf ./dist && tsc", | |
| "start": "node dist/app.js" | |
| }, | |
| "license": "ISC", | |
| "devDependencies": { | |
| "@types/jest": "^30.0.0", | |
| "@types/node": "^25.3.5", | |
| "jest": "^30.2.0", | |
| "nodemon": "^3.1.14", | |
| "rimraf": "^6.1.3", | |
| "supertest": "^7.2.2", | |
| "ts-jest": "^29.4.6", | |
| "ts-node": "^10.9.2", | |
| "tsx": "^4.21.0", | |
| "typescript": "^5.9.3" | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "compilerOptions": { | |
| "target": "ESNext", | |
| "module": "NodeNext", // Obligatorio para Node + ESM | |
| "moduleResolution": "NodeNext", // Obligatorio si 'module' es NodeNext | |
| "isolatedModules": true, | |
| "rootDir": "src", | |
| "outDir": "dist", | |
| "strict": true, | |
| "skipLibCheck": true, | |
| "esModuleInterop": true, | |
| "verbatimModuleSyntax": true, // Lo que pedía tu error anterior | |
| "sourceMap": true, | |
| "declaration": true | |
| }, | |
| "include": ["src/**/*"], | |
| "exclude": ["node_modules", "**/*.test.ts"] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment