Match existing style
Updated 2026-02-13
Preserve indentation, quotes, semicolons, and formatting of the file; don't reformat unrelated lines. Use in any AI-assisted editor.
Use in Cursor, Windsurf, Codeium, or any AI-assisted editor.
Rule
# Match existing style
Preserve the existing formatting and style of the file you are editing.
- **Indentation:** Use the same indent (tabs vs spaces, and width) as the rest of the file.
- **Quotes and semicolons:** Match the project's preference (single vs double quotes, trailing semicolons or not).
- **Line length and wrapping:** Follow how similar code is wrapped in the same file.
- **Do not:** Reformat unrelated lines or the whole file unless the user asked for a format pass. Consistency with the existing file trumps personal or global style preferences.