formatter
A formatter is a development tool that automatically rewrites source code layout, such as indentation, line breaks and spacing, into a set style.
A formatter, or code formatter, is a tool that automatically rewrites the presentation of source code, such as indentation, line breaks, spacing and quotation marks, to match a fixed set of rules without changing how the code behaves. Well-known examples include Prettier for JavaScript, Black for Python and gofmt for Go.
Unlike a linter, which finds errors and risky patterns, a formatter focuses on making code look consistent. It is used to keep a uniform style in code edited by many people or by AI coding tools.
This entry is based on AIPOST articles and widely known facts. If something is wrong, please send us a correction request.