Skip to content
This repository was archived by the owner on Jun 2, 2026. It is now read-only.

Implement Proper Linting with Prettier for Code Consistency#72

Closed
SOUMITRO-SAHA wants to merge 3 commits into
voideditor:mainfrom
SOUMITRO-SAHA:soumitra
Closed

Implement Proper Linting with Prettier for Code Consistency#72
SOUMITRO-SAHA wants to merge 3 commits into
voideditor:mainfrom
SOUMITRO-SAHA:soumitra

Conversation

@SOUMITRO-SAHA

Copy link
Copy Markdown
Contributor

Implement Proper Linting with Prettier for Code Consistency

Issue #71

PR Description:

This pull request sets up proper linting and formatting using Prettier from scratch to ensure consistent code style and readability across the project.

Key Changes:

  • Implemented Prettier for consistent code formatting.
  • Configured .prettierrc to define formatting rules (e.g., spacing, quote style, trailing commas).
  • Added a format script (npm run format) to automatically format all files in the project according to Prettier rules.

Highlights:

  • Prettier will automatically format files on save (if integrated with your editor).
  • Running npm run format will format the entire codebase, ensuring consistent code style across all files.

Note: For now, pre-commit hooks have been disabled by Void team, so the pre-commit setup has been removed. However, consistency can still be ensured by saving files in an editor that supports Prettier or by running the npm run format command manually.

Future Pre-commit Hook Implementation:

If the Void team or anyone else are going to reintroduce pre-commit hooks in the future, they can easily do so by running lint-staged within the pre-commit script. This will automatically enforce linting before each commit, preventing inconsistent code from being committed.

Outcome: This setup ensures that all code follows the same formatting standards, improving the readability and maintainability of the project while allowing developers to manually format code whenever necessary.

@SOUMITRO-SAHA

Copy link
Copy Markdown
Contributor Author

Hey @andrewpareles, could you clarify what needs to be done here?

@andrewpareles andrewpareles added low priority Low priority issue and removed documentation labels Oct 17, 2024
@andrewpareles

Copy link
Copy Markdown
Contributor

We prefer using the default JS/TS formatter, and not prettier. We might change this in the future.

@andrewpareles

Copy link
Copy Markdown
Contributor

Not doing this right now!

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

Labels

low priority Low priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants