clean-code-javascript
clean-code-javascript copied to clipboard
ESLint
Is it possible to make an ESLint configuration that takes into account these good practices? It would be a good idea to be able to evaluate the code and reinforce the behavior.
Thank you so much for all the work!
ESLint
is a linter. I doubt many of the code practices mentioned here will be pluggable into a personal config. Good idea, though.
Good question! There are probably a few things on here that ESLint (or another static analysis tool) can take care of. It would be good to enumerate these. There are tools to tell you if your function has too many arguments, has too much cyclomatic complexity, and if your code structure of one method is similar to another. That's just off the top of my head, there's probably more. One of the overarching goals of this project (along with Clean Code) is to discuss the parts you can't automate easily, the human parts of the code if you will!
While there are a lot of existing linting rules which apply, I found some of those discussed were missing from TSLint. I created https://github.com/Glavin001/tslint-clean-code to apply what I have learned about clean code in a more concrete way. Still lots of work ahead. Would love contributors!
@Glavin001 Nice job!
@Glavin001 That's really nice. I'll try it!
Nice! I will make use of it