Skip to content

updated and added and formated .editorconfig#34

Open
Rakshitgoyal770 wants to merge 1 commit into
Women-Coding-Community:mainfrom
Rakshitgoyal770:rakshit-wcc-qa
Open

updated and added and formated .editorconfig#34
Rakshitgoyal770 wants to merge 1 commit into
Women-Coding-Community:mainfrom
Rakshitgoyal770:rakshit-wcc-qa

Conversation

@Rakshitgoyal770

Copy link
Copy Markdown

No description provided.

@Rakshitgoyal770

Copy link
Copy Markdown
Author

Closes #29
Added .editorconfig matching the existing Prettier config (tabs, LF line endings, UTF-8, final newline, trailing whitespace trimmed — relaxed for .md files).

Comment thread .editorconfig
end_of_line = lf
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
trim_trailing_whitespace = true
trim_trailing_whitespace = true
max_line_length = 120

It will mirror Prettier's printWidth.

Comment thread .editorconfig
root = true

[*]
indent_style = tab

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As currently we have YAML format for template issues that would be broken by a tab-indenting editor. It must use spaces, not tabs. The [*] block sets indent_style = tab for every file, but YAML syntax forbids tab indentation. Prettier already emits spaces for YAML regardless of useTabs, so the .editorconfig should mirror that with an override.

You might consider putting it at the end:

# YAML disallows tab indentation; Prettier emits spaces here too
[*.{yml,yaml}]
indent_style = space
indent_size = 2

Comment thread .editorconfig
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also noticed that package-lock.json has been reformatted. It is generated and owned by npm, which always writes it as 2-space JSON, therefore should not be reformatted.
The .editorconfig should match what npm (and .prettierignore) already do. You might want to consider adding something like this:

[package-lock.json]
indent_style = space
indent_size = 2

@nora-weisser nora-weisser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for your contribution! I've made a few comments :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants