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 formatting rules and linting to react-server code #221

Closed
massi-ang opened this issue Feb 12, 2024 · 2 comments · Fixed by #223
Closed

Add formatting rules and linting to react-server code #221

massi-ang opened this issue Feb 12, 2024 · 2 comments · Fixed by #223

Comments

@massi-ang
Copy link
Contributor

Using standard code formatting and linting is important for several reasons:

  1. Readability: Standard code formatting makes code more readable and understandable to other developers who may need to work with or maintain the code in the future. Consistent indentation, spacing, and formatting conventions help to structure the code in a way that is easy to follow.

  2. Maintainability: Consistent code formatting makes it easier to identify and fix bugs, as well as make enhancements or modifications to the codebase. When code is formatted consistently, developers spend less time deciphering the code's structure and can focus more on its logic and functionality.

  3. Collaboration: When multiple developers are working on the same project, adhering to a standard code formatting style ensures consistency across the codebase. This reduces confusion and misunderstandings among team members and promotes collaboration by making it easier to review, understand, and contribute to each other's code.

  4. Code Reviews: Standard code formatting facilitates the code review process by providing a common baseline for evaluating code quality and style. Reviewers can focus on higher-level aspects of the code, such as logic correctness and performance, rather than getting bogged down in stylistic inconsistencies.

  5. Tooling Support: Many integrated development environments (IDEs) and code editors offer built-in support for enforcing and automatically applying code formatting rules. By using standard formatting conventions, developers can take advantage of these tools to ensure that their code remains consistent and properly formatted throughout the development process.

  6. Professionalism: Consistent code formatting reflects positively on the professionalism and attention to detail of the development team. It demonstrates a commitment to writing clean, maintainable code that is easy to understand and work with, which can contribute to the overall quality of the software product.

In summary, adhering to a standard code formatting style is essential for promoting readability, maintainability, collaboration, and professionalism in software development projects.

More info about linters and formatters can be found here

@ianarawjo
Copy link
Owner

Hey massi! Your PRs have been noted and I will look at them in detail when I have a good moment of free time.

@massi-ang
Copy link
Contributor Author

Thanks. As I wrote in the 2 PRs:

  1. Look at Adding consistent formatting rule for react server #222 first and merge it. This PR is only about code formatting, and the result can be easily reproduced by running prettier with the committed configuration
  2. After Adding consistent formatting rule for react server #222 has been merged, Add eslint and code fixes after formatting #223 will show a more reasonable diff. The changes made are the minimal ones so that eslint passes with the given configuration.

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 a pull request may close this issue.

2 participants