clean-code-javascript icon indicating copy to clipboard operation
clean-code-javascript copied to clipboard

ESLint

Open gmarcos87 opened this issue 7 years ago • 6 comments

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!

gmarcos87 avatar Apr 13 '17 15:04 gmarcos87

ESLint is a linter. I doubt many of the code practices mentioned here will be pluggable into a personal config. Good idea, though.

yeskunall avatar Apr 13 '17 17:04 yeskunall

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!

ryanmcdermott avatar Apr 13 '17 17:04 ryanmcdermott

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 avatar Sep 01 '17 15:09 Glavin001

@Glavin001 Nice job!

ryanmcdermott avatar Sep 01 '17 15:09 ryanmcdermott

@Glavin001 That's really nice. I'll try it!

gmarcos87 avatar Sep 02 '17 21:09 gmarcos87

Nice! I will make use of it

janakhpon avatar Feb 15 '19 13:02 janakhpon