-
Notifications
You must be signed in to change notification settings - Fork 16
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 a "code consistency" chapter #1
Comments
Yeah, good idea. I wonder if a part of this belongs to the linting chapter. |
I think linting is one way to attempt to solve consistency, but linting can't solve your whole codebase. |
Yup, that's true. This needs more fodder to show examples which cannot be captured by linting. |
I can think of two
|
Ok, http://eslint.org/docs/rules/accessor-pairs covers latter. 😄 |
Oops! I didn't know. Perhaps there isn't a need for this extra section then? 😄 |
Yeah, let's leave this open for a while to gather ideas. |
As food for thought, there are a bunch of inconsistencies which can't be handled by means of static analysis. Naming consistencies are the first ones I can think of, e.g.:
|
@dcarral Great point. Maybe this is where custom linting rules could come in? Naming tends to be more project specific than other rules. Pushing towards automation and showing how to do that might work here. |
* feat: Add a section about code consistency Closes #1. * chore: Add examples of code consistency
Code consistency is crucial for readability and maintainability:
class
andfunction
declarations cause inconsistency?)Consistency patterns:
The text was updated successfully, but these errors were encountered: