Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESLint and Prettier Rules Config Files #2724

Open
ImBIOS opened this issue Dec 12, 2024 · 1 comment · May be fixed by #2726
Open

Add ESLint and Prettier Rules Config Files #2724

ImBIOS opened this issue Dec 12, 2024 · 1 comment · May be fixed by #2726
Labels
Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥

Comments

@ImBIOS
Copy link

ImBIOS commented Dec 12, 2024

PROBLEM:
When working on collaborative codebases, developers often face inconsistencies in coding style and format. This can lead to unnecessary code review comments and difficulty maintaining a uniform code style.

SOLUTION:
Add configuration files for ESLint and Prettier to enforce consistent code quality and style across the project. Use the ESLint rules from the create-t3-app stack as a base, as they are well-optimized for modern TypeScript/JavaScript projects and include sensible defaults for strict linting and formatting.

ALTERNATIVES:

  1. Use only Prettier without ESLint for formatting, but it won't cover linting issues.
  2. Use a different linter like JSHint, but it lacks the community support and features of ESLint.
  3. Create custom ESLint rules from scratch, but aligning with best practices may take more effort.

RELEVANCE / SCOPE:
This would benefit nearly all developers working in JavaScript/TypeScript projects as consistent code style is a universal need. The create-t3-app rules are particularly relevant for projects using TypeScript.

"SIDE EFFECTS":
Some developers might need to update their local environment to align with the configured rules. Existing code might require reformatting to meet the enforced style, causing a one-time disruption.

CONTEXT:
Adding ESLint and Prettier configurations, specifically leveraging the create-t3-app rules, ensures that every contributor adheres to a unified coding standard. These rules provide strict but practical guidelines, improving collaboration, maintainability, and code quality.


SHORT Table (Summary)
Problem Inconsistent code style and quality in collaborative projects.
Solution Add ESLint and Prettier configuration files, using create-t3-app ESLint rules.
Alternatives Use Prettier alone, JSHint, or custom ESLint rules.
Scope Universal benefit for JavaScript/TypeScript projects, especially those using TypeScript and React.
Side effects Requires reformatting existing code and updating local setups.
Context Improves collaboration and maintainability with practical and strict rules.

@ImBIOS ImBIOS added Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Dec 12, 2024
@4yman-0 4yman-0 linked a pull request Dec 12, 2024 that will close this issue
4 tasks
@mahtabhnp
Copy link

Hi,
I’m interested in working on this issue. Could you please assign it to me? This will be my first contribution, and I’m excited to get started. Let me know if there are any specific guidelines or steps I should follow.

Thank you!
@ImBIOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request Wish or idea good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants