An ESLint plugin that integrates TypeScript's built-in formatter as an ESLint rule, allowing developers to apply TypeScript formatting (like indent, semicolons, quotes) directly via ESLint. Version 1.0.0 is the initial stable release. It provides a single rule 'typescript-formatter/format' with comprehensive options mirroring TypeScript's formatting settings. Differentiator: it leverages the official TypeScript formatter, ensuring consistency with the TypeScript compiler's formatting, as opposed to third-party formatters like Prettier or dprint. Requires peer dependencies eslint >=8.0.0 and any TypeScript version.
npm install eslint-plugin-typescript-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configure the typescript-formatter/format rule in ESLint; includes both legacy .eslintrc and flat config examples.
Use import or dynamic import().
Remove deprecated options like 'baseIndentSize' if using TS >5.0.
Lock TypeScript version in project and test formatting after updates.
Use import typescriptFormatter from 'eslint-plugin-typescript-formatter'; set plugins['typescript-formatter'] = typescriptFormatter.
Use 'indentStyle': 'Smart' or 'Block' string values.
Ensure plugin is added to 'plugins' array and rule is prefixed with 'typescript-formatter/'
Use import syntax or switch to dynamic import()
Remove 'baseIndentSize' from rule options