From b3fe093ca58c05f1ae73e9316c135be51a96d844 Mon Sep 17 00:00:00 2001 From: dfh Date: Fri, 2 Aug 2024 19:54:33 +0000 Subject: [PATCH] docs: update contributing/formatting/editorconfig --- contributing/formatting/editorconfig.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/contributing/formatting/editorconfig.md b/contributing/formatting/editorconfig.md index c37fdd6..3c172ca 100644 --- a/contributing/formatting/editorconfig.md +++ b/contributing/formatting/editorconfig.md @@ -2,7 +2,7 @@ title: Editorconfig description: Using .editorconfig published: true -date: 2024-05-16T22:15:36.684Z +date: 2024-08-02T19:54:32.003Z tags: editor: markdown dateCreated: 2024-05-05T18:30:37.455Z @@ -20,6 +20,11 @@ end_of_line = lf insert_final_newline = true indent_style = tabs ``` + +> The formatting tool `prettier` adjust auto-formatting styles according to `.editorconfig` but ignores some attributes. This includes `insert_final_newline` which is hard-coded to `true`. See [prettier issue #6360](https://github.com/prettier/prettier/issues/6360#issuecomment-520368783) +> Please ensure you are not setting `insert_final_newline` in any of your language specific settings. +>{.is-info} + And add any additional types you need from below, making sure to separate each section with a new line. --- @@ -31,7 +36,6 @@ Using nixfmt-rfc-style ```editorconfig [*.nix] indent_size = 2 -insert_final_newline = false indent_style = space ``` @@ -55,7 +59,6 @@ Using cargo fmt ```editorconfig [*.rs,Cargo.toml] indent_size = 4 -insert_final_newline = false ``` ## Go @@ -87,7 +90,6 @@ indent_size = 4 [*.md] indent_size = 2 trim_trailing_whitespace = false -insert_final_newline = false ``` ## Web