Skip to content

chore: add .editorconfig for consistent formatting#1068

Open
aniruddhaadak80 wants to merge 1 commit intof:mainfrom
aniruddhaadak80:add-editorconfig
Open

chore: add .editorconfig for consistent formatting#1068
aniruddhaadak80 wants to merge 1 commit intof:mainfrom
aniruddhaadak80:add-editorconfig

Conversation

@aniruddhaadak80
Copy link

@aniruddhaadak80 aniruddhaadak80 commented Mar 10, 2026

📝 Why is this useful?

Currently, the repository does not have an .editorconfig file.

This PR adds a standard .editorconfig to enforce foundational coding styles across different editors and IDEs (indentations, newlines, whitespace). This makes the open-source contributor experience smoother and avoids whitespace/line-ending differences in future Pull Requests.

🛠️ Key Changes

  • ✅ Added .editorconfig setting default root styles (indent_size = 2, end_of_line = lf, etc.).

Copilot AI review requested due to automatic review settings March 10, 2026 14:52
@coderabbitai
Copy link

coderabbitai bot commented Mar 10, 2026

📝 Walkthrough

Walkthrough

A new .editorconfig file is introduced at the project root to enforce consistent code formatting conventions across the project, specifying character encoding, line endings, indentation style, and whitespace handling with markdown-specific exceptions.

Changes

Cohort / File(s) Summary
EditorConfig Setup
.editorconfig
New configuration file defining universal formatting rules (UTF-8 encoding, LF line endings, 2-space indentation, trailing whitespace trimming) with markdown overrides to preserve formatting and trailing whitespace.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Hops with delight through consistent spaces,
Two indents wide, in all the right places!
UTF-8 harmony, LF lines so clean,
The tidiest config the editor's seen!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: add .editorconfig for consistent formatting' directly and accurately summarizes the main change—adding an .editorconfig file to enforce consistent coding styles.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an .editorconfig to standardize basic formatting across the repository so contributors’ editors apply consistent whitespace/EOL settings.

Changes:

  • Introduces root .editorconfig with UTF-8, LF line endings, final newline, 2-space indentation, and trailing whitespace trimming defaults.
  • Adds Markdown-specific overrides to keep trailing whitespace.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

trim_trailing_whitespace = true

[*.md]
ignore_format = true
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

ignore_format is not a standard EditorConfig property and there’s no evidence in this repo that any formatter/linter reads it. If the intent is to prevent formatting Markdown, consider removing this key (to avoid a misleading no-op) and instead configure the actual formatter (e.g., Prettier/ESLint/IDE settings) to ignore *.md, or add a brief note/tooling reference explaining what consumes ignore_format here.

Suggested change
ignore_format = true
# Note: Markdown formatting exclusions are configured in the formatter (e.g., Prettier), not via EditorConfig.

Copilot uses AI. Check for mistakes.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.editorconfig:
- Around line 11-13: Remove the non-standard EditorConfig property
"ignore_format" from the .editorconfig block and either delete that line or
replace it with a tool-specific setting (e.g., use your formatter's ignore
mechanism such as .prettierignore or an IDE-specific key like
disable_formatter=true in the tool's config) while keeping only valid
EditorConfig properties like "trim_trailing_whitespace" in the [*.md] section;
ensure no other non-standard keys remain.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: af6775d9-e269-4d1d-ae08-dbf121bbdc84

📥 Commits

Reviewing files that changed from the base of the PR and between ef30314 and 1854776.

📒 Files selected for processing (1)
  • .editorconfig

Comment on lines +11 to +13
[*.md]
ignore_format = true
trim_trailing_whitespace = false
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Is ignore_formata supported standard property in the EditorConfig specification, and which popular editors or formatters, if any, recognize it in.editorconfig files?

💡 Result:

No. ignore_format is not a standard (spec-defined) EditorConfig property. The EditorConfig spec defines a fixed set of keys (e.g., indent_style, indent_size, end_of_line, etc.), and explicitly says plugins must ignore unrecognized keys—so a conforming EditorConfig implementation will treat ignore_format as an unknown no-op unless a specific tool adds custom support for it. [1]

As for popular editors/formatters recognizing ignore_format specifically in .editorconfig: I couldn’t find any mainstream editor/formatter that documents support for an ignore_format key. Instead, common tools use other mechanisms:

  • JetBrains IDEs / ReSharper / Rider: support disabling their formatter via disable_formatter=true in matching EditorConfig sections (not ignore_format). [2]
  • Prettier: respects certain standard EditorConfig keys (like indent_style and end_of_line), but uses .prettierignore and // prettier-ignore-style pragmas for excluding formatting (not ignore_format). [3][4]

Sources: EditorConfig spec [1], JetBrains docs [2], Prettier ignore docs [3], Prettier options/docs on EditorConfig integration [4].


Remove or replace ignore_format — it is not a standard EditorConfig property.

Line 12 defines a non-standard key that EditorConfig implementations will silently ignore per spec. If disabling Markdown formatting is required, use tool-specific configuration instead (e.g., disable_formatter=true for JetBrains IDEs, or .prettierignore for Prettier).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.editorconfig around lines 11 - 13, Remove the non-standard EditorConfig
property "ignore_format" from the .editorconfig block and either delete that
line or replace it with a tool-specific setting (e.g., use your formatter's
ignore mechanism such as .prettierignore or an IDE-specific key like
disable_formatter=true in the tool's config) while keeping only valid
EditorConfig properties like "trim_trailing_whitespace" in the [*.md] section;
ensure no other non-standard keys remain.

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