Closed frankrousseau closed 10 years ago
I did proposal PR about that. Hope it s fine.
I adjusted standard jshint with those noticeable values
"latedef": false,
"undef": false,
"unused": false,
"multistr": true,
"esnext": true,
Ok I don't know well available javascript linting rules, so I need to study them before going further. I come back to you very soon about that subject.
What do you think about ESLint? http://eslint.org/docs/rules/
It looks to have a lot more rules.
seems real good, reading the README is engaging, and the doc is much more confortable to read. +1
Running it again the source code is, again, much more confortable to read.
This said, it triggers much more issues than JSHINT, such 509:10 error Don't use process.exit(); throw an error instead no-process-exit
Which i think, none of, the current solution, nor the error throw method are right way to do : / the process should stop naturally when resources gots closed.
Also it needs to change cozy-light binary file and append it a .js extension, otherwise, somehow, eslint does not parse it at all.
besides that, i confirm my first feeling, it s real good !
my 2 cents.
Ok ESLint is now used to lint the code. It's stricter but it pushes to write better code.
great ! I d sggest also to revise all the callback to respect node standard always passing err first : (err, extraarg1...)
:+1:
Contributions don't follow the same code style as the core code. We should add a javacript lint configuration, stick to it and made it mandatory for any code contribution.