A zero-extend ESLint flat config for TypeScript projects, providing a curated ruleset focused on runtime safety and import organization via eslint-plugin-import-x. Current stable version is v4.2.0, released in early 2025 with support for ESLint v9/v10 and TypeScript 5. It differs from other shared configs by avoiding any base config inheritance, making all rules explicit for transparency, and heavily emphasizing fixable import sorting and formatting rules. The package migrated from eslint-plugin-import to eslint-plugin-import-x in v4.1.5 and dropped prettier-plugin in v4.0.0, requiring manual prettier setup if needed.
npm install eslint-config-ts-prefixerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup: import config, spread into defineConfig, set tsconfigRootDir for type-aware rules.
Install prettier and eslint-plugin-prettier manually, or use Prettier standalone.
Migrate to eslint.config.js using flat config format. See ESLint migration guide.
If you rely on old import plugin rules, update rule names to match eslint-plugin-import-x.
Set parserOptions.tsconfigRootDir to import.meta.dirname (or __dirname in CJS).
Add separate overrides for .js/.mjs files if needed, or use a different config for JS.
Upgrade to flat config and eslint-config-ts-prefixer v4.
Run `npm install --save-dev eslint-config-ts-prefixer` and ensure you import as 'eslint-config-ts-prefixer' (no scope).
Import { defineConfig } from 'eslint/config'.Make sure to spread inside an array: defineConfig([...tsPrefixer, ...])
Add languageOptions.parserOptions.tsconfigRootDir: import.meta.dirname