Improvement/GDL-12-add-prettier-config#211
Improvement/GDL-12-add-prettier-config#211benzekrimaha wants to merge 4 commits intodevelopment/8.2from
Conversation
Hello benzekrimaha,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
42093e9 to
6749be6
Compare
Issue: GDL-12
This commit defines line ending/newline defaults and per-file indentation rules so local editors match the shared Prettier policy across JS/TS, JSON, YAML, Markdown, and Makefiles. Issue: GDL-12
This commit upldate the documentation to explain the new Prettier baseline, recommended adoption steps, and editor alignment so downstream repositories can import and apply the config consistently. Issue: GDL-12
6749be6 to
2fb532e
Compare
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
.editorconfig
Outdated
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| [Makefile] |
There was a problem hiding this comment.
Also applies to golang (which we have in our code base, and would thus be affected by a .editorconfig file)
| [Makefile] | |
| [{Makefile,*.go,go.*}] |
| indent_size = 4 | ||
|
|
||
| [Makefile] | ||
| indent_style = tab |
There was a problem hiding this comment.
Should also specify indent_size (for alignment) ?
| indent_style = tab | |
| indent_style = tab | |
| indent_size = 4 |
| charset = utf-8 | ||
| end_of_line = lf | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true |
There was a problem hiding this comment.
| trim_trailing_whitespace = true | |
| trim_trailing_whitespace = true | |
| max_line_length = 120 |
There was a problem hiding this comment.
(or maybe should only be set for javascript files, e.g. around line 11)
.editorconfig
Outdated
| indent_style = space | ||
| indent_size = 4 |
There was a problem hiding this comment.
nit: instead of repeating indent style & size for each kind of file, we may put this in the * block and override it only where needed (to reduce duplication)
README.md
Outdated
| } | ||
| ``` | ||
|
|
||
| Projects are free to override options locally (for example `tabWidth` or |
There was a problem hiding this comment.
| Projects are free to override options locally (for example `tabWidth` or | |
| Projects may override options locally (for example `tabWidth` or |
README.md
Outdated
| Node.js codebases. YAML defaults to 2-space indentation, JSON and Markdown to | ||
| 4-space indentation, and Markdown prose is left un-reflowed by default | ||
| (`proseWrap: 'preserve'`) to avoid noisy diffs in existing documentation. |
There was a problem hiding this comment.
this paraphrases the content of the config, so does not add much value but creates a risk of being outdated: best leave it out?
| Node.js codebases. YAML defaults to 2-space indentation, JSON and Markdown to | |
| 4-space indentation, and Markdown prose is left un-reflowed by default | |
| (`proseWrap: 'preserve'`) to avoid noisy diffs in existing documentation. | |
| Node.js codebases. |
README.md
Outdated
|
|
||
| ## Editor configuration | ||
|
|
||
| For a consistent editor experience, you can copy or adapt the `.editorconfig` |
There was a problem hiding this comment.
| For a consistent editor experience, you can copy or adapt the `.editorconfig` | |
| For a consistent editor experience, you can copy the `.editorconfig` |
| 4-space indentation, and Markdown prose is left un-reflowed by default | ||
| (`proseWrap: 'preserve'`) to avoid noisy diffs in existing documentation. | ||
|
|
||
| ## Editor configuration |
There was a problem hiding this comment.
do we actually need (and recommend) using editorconfig ?
- AFAIK there is currently not much problem, editors (like vscode) already follow the code appropriately
- since we need to copy the file, it creates an independent copy, which may diverge over time... and we have no way to check consistency with the "original" in Guidelines (or should we have a postscript to copy the .editorconfig from guideline module to the root of the repo importing it?)
→ either it is needed, and we should recommend to use it ("For a consistent editor experience, you should copy the .editorconfig...)
→ or it is not needed, and there is no need to mention it
Reduce editorconfig duplication, add Go/Makefile tab alignment and max line length, and tighten README wording to avoid config drift and clarify .editorconfig recommendation.
Issue: GL-12