Shared build and quality-tooling configuration for Stackcrafters TypeScript projects.
This package publishes reusable presets for:
- TypeScript
- ESLint flat config
- Prettier integration
- Jest
- React-specific TypeScript and ESLint setups
- Node.js 24 LTS
- npm
This repository is configured for Node v24.14.0 via .nvmrc.
Install the package from the Stackcrafters GitHub Packages registry:
npm install -D @stackcrafters/ts-build-configIf your environment does not already authenticate against GitHub Packages, make sure your .npmrc is configured for the @stackcrafters scope.
Published files live under config/.
config/tsconfig.json: base TypeScript config for non-React projectsconfig/tsconfig.node.json: supporting Node/project-reference TypeScript configconfig/eslint.config.mjs: base ESLint flat configconfig/jest.config.js: shared Jest configconfig/react/tsconfig.json: React TypeScript configconfig/react/tsconfig.node.json: React tooling TypeScript configconfig/react/eslint.config.mjs: React ESLint flat configconfig/index.js: CommonJS entrypoint that exports the shared Jest config
Create a tsconfig.json in the consuming project:
{
"extends": "@stackcrafters/ts-build-config/config/tsconfig.json"
}The base config is intended for modern bundler-based TypeScript projects. It enables strict type-checking, moduleResolution: "bundler", and noEmit.
Create a tsconfig.json in the consuming project:
{
"extends": "@stackcrafters/ts-build-config/config/react/tsconfig.json"
}This preset adds jsx: "react-jsx" on top of the modern bundler-oriented TypeScript defaults.
Create eslint.config.mjs in the consuming project:
import baseConfig from '@stackcrafters/ts-build-config/config/eslint.config.mjs';
export default [...baseConfig];The base config includes:
- ESLint recommended rules
typescript-eslintrecommended rules- Prettier integration
- browser, Node, and Jest globals
- underscore-prefixed unused variable exemptions
Create eslint.config.mjs in the consuming project:
import reactConfig from '@stackcrafters/ts-build-config/config/react/eslint.config.mjs';
export default [...reactConfig];The React config adds:
eslint-plugin-reactflat recommended rulesjsx-runtimesupporteslint-plugin-react-hooksrecommended rules- TypeScript and Prettier integration
Create jest.config.js in the consuming project:
const { jest: baseConfig } = require('@stackcrafters/ts-build-config/config');
module.exports = {
...baseConfig
};The shared Jest config is aimed at source-first projects and includes:
ts-jesttransforms for JavaScript and TypeScriptsrcas the default test root*.test.ts,*.test.tsx,*.test.js, and*.test.jsxmatchingnode_modulesandsrcmodule resolution
You can extend the exported config in the consuming repository rather than copying it.
Example ESLint override:
import baseConfig from '@stackcrafters/ts-build-config/config/eslint.config.mjs';
export default [
...baseConfig,
{
rules: {
'no-console': 'warn'
}
}
];Example Jest override:
const { jest: baseConfig } = require('@stackcrafters/ts-build-config/config');
module.exports = {
...baseConfig,
collectCoverageFrom: ['src/**/*.{ts,tsx,js,jsx}']
};- File paths under
config/should be treated as part of the package API. - This package intentionally ships configuration, not compiled runtime code.
- The current Jest preset stays on the Jest 29 ecosystem because
ts-jestcompatibility remains centered on that major line.
Install dependencies:
npm installUpdate dependencies:
npm run update_depsPublishing is handled by GitHub Actions when a GitHub release is created.
The release workflow:
- uses Node from
.nvmrc - runs
npm ci - publishes to
https://npm.pkg.github.com
Additional maintainer notes live in:
AGENTS.mdconfig/AGENTS.mdconfig/react/AGENTS.md