tsconfig, ESLint, Prettier and EditorConfig: A Modern Setup That Works Together
What each JavaScript config file does, 2026 defaults for tsconfig and ESLint flat config, how Prettier and ESLint stop fighting, and a quick setup.

A fresh JavaScript project rarely fails because of its code. It fails because of its configuration: a copied tsconfig that uses the wrong module setting, an .eslintrc that ESLint no longer reads, or Prettier and ESLint arguing over semicolons on every save. Knowing what each file is for makes these problems easy to avoid.
Four files, four jobs
TypeScript's tsconfig.json tells the compiler which files belong to the project and how strictly to check them. ESLint's config chooses rules that catch likely bugs, such as unused variables, missing dependencies in React hooks or code after a return. Prettier formats code so nobody has to discuss indentation in reviews. EditorConfig is the simplest of all: it tells every editor, before any tool runs, to use the same indent, character set and line endings.
They overlap a little, so they need to agree. The indent width in EditorConfig should match Prettier's, and ESLint must not have formatting rules that Prettier will undo.
TypeScript: target, module and resolution
Three settings cause most confusion. target sets which JavaScript features the output may use; ES2022 is safe for current browsers and Node. module and moduleResolution decide how imports are understood. For apps built by Vite, webpack or Next.js, use module ESNext with moduleResolution bundler: imports work without file extensions, just as the bundler expects. For code that Node runs directly, or a library you publish, use NodeNext for both, which follows Node's own rules, including the .js extension in relative imports.
Turn strict on for new code. It enables a family of checks, including the null checks that catch the most common runtime crash. If you want more, noUncheckedIndexedAccess makes array and object lookups possibly undefined, which is annoying at first and then catches real bugs.
isolatedModules and verbatimModuleSyntax keep each file compilable on its own, which is how fast compilers like esbuild and SWC work. skipLibCheck skips checking the type files inside node_modules, saving time and avoiding errors you cannot fix.
ESLint: the flat config era
ESLint 9 replaced the old .eslintrc files with eslint.config.js, a plain JavaScript module that exports an array of configuration objects. Plugins are imported like any other package, so it is obvious where rules come from. Older configs are no longer read by default, which is why copied setups from a few years ago silently stop linting.
A typical modern config starts from the recommended JavaScript rules, adds typescript-eslint's recommended set, adds framework plugins such as React hooks, Vue or Svelte, sets the right globals for the browser or Node, and ends with eslint-config-prettier, which switches off any rule that would conflict with Prettier.
Prettier and EditorConfig
Prettier needs only a few decisions: indent width or tabs, single or double quotes, semicolons, line width, trailing commas and line endings. Prettier 3 defaults to trailing commas everywhere and LF line endings, both good choices. Add a .prettierignore so it skips build output and lock files. EditorConfig then repeats the indent, charset and line endings for editors, with an exception for Markdown, where trailing spaces can mean a line break.
Generating a matching set
Rather than assembling these from four different docs, the Frontend Config Generator asks a few questions and writes them together. Pick the project type, such as React with Vite, Next.js, Vue, SvelteKit, a Node service or an npm library. Choose TypeScript or JavaScript, the strictness level, whether the package is an ES module and an import alias. Then set your style once. Every compiler option comes with a one-line reason in a table and, if you like, as a comment in the tsconfig itself.
You get tsconfig.json or jsconfig.json, eslint.config.js, .prettierrc.json and .prettierignore, .editorconfig and a scripts block for typecheck, lint and format, plus an install command listing exactly the packages the files import.
Check before you commit
Run the type checker, the linter and Prettier's check mode once on the whole project after adding the files. Fix or silence the handful of issues they find, then add the same three commands to your CI so the setup keeps paying off.
Summary
tsconfig decides how TypeScript reads your code, ESLint catches mistakes, Prettier formats and EditorConfig keeps editors in line. Use bundler resolution for bundled apps and NodeNext for Node, strict mode for new code, the flat ESLint config with Prettier's compatibility layer last, and one shared style across all of them.



