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

Feature : Refine Linting and Formatting Configuration #243

Closed
wants to merge 10 commits into from

Conversation

TanmayDhobale
Copy link
Contributor

Updated ESLint and Prettier configs for better code consistency. Includes refined rules and pre-commit hook adjustments to automatically fix format and lint issues, making code contributions smoother.

Changes

  • Updated .eslintrc with additional rules for TypeScript, improving code quality and consistency.
  • Modified the .prettierrc file to refine formatting rules, ensuring that automatic code formatting aligns with our project's standards.
  • Enhanced the pre-commit hooks in .husky/pre-commit to run both formatting and linting fixes automatically, reducing the likelihood of committing code that doesn't meet our guidelines.

Impact

  • Contributors will experience fewer discrepancies when pushing code, as the pre-commit hooks now more thoroughly ensure code adheres to our standards.
  • These updates aim to streamline the development workflow by reducing manual linting and formatting interventions required from contributors.
  • By enforcing a consistent coding style, we improve the readability and maintainability of our codebase.

Testing

  • Introduced intentional linting/formatting violations to verify that the pre-commit hooks automatically correct them or block the commit when auto-fixes are not possible.
  • Confirmed that the updated configurations do not conflict with our current codebase by successfully committing changes after the updates.

Please review the changes and provide any feedback you might have! fixed #201

@aryanprince
Copy link
Contributor

aryanprince commented Mar 18, 2024

@TanmayDhobale I also created a similar PR (#244) although I believe it solves a different problem at the moment. Your PR is valuable in that it includes improved formating, linting, and Husky pre-commit configs.

But this PR still has issues with ESLint overwriting rules from Prettier when I tested this PR locally.

Could you also verify by trying format:fix and then lint:fix to see if ESLint is overriding any Prettier changes? See videos here (the 'before changes' one) to see what I'm specifically talking about.

I think best case would be to first merge #244 to fix conflicting style rules, and then bring over all of your additions to linting, formatting, and Husky.

PS: Also, I think it's best if you exclude applying the actual linting/formatting changes to files - and include them in a separate PR. As this PR currently has a lot of file changes irrelevant to the PR topic.

@TanmayDhobale
Copy link
Contributor Author

@aryanprince yea sure , i am closing this pr now thanks

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.

Add standard linting for vscode
2 participants