brianc / node-pg-types

Type parsing for node-postgres
268 stars 55 forks source link

Add lint #92

Closed sehrope closed 5 years ago

sehrope commented 5 years ago

Adds an eslint config matching the one for pg. Baseline adds eslint as a dev dependency, adds it to Travis, and disables everything necessary to get it to be quiet. Rest of the commits are one-by-one enabling one the silenced rules.

The last one, semi, enables mandatory semi colons. This is the reverse of pg but it was 11 changes to go in this direction vs 235 changes to mandate no-semicolons everywhere...

Also, I've rebased this atop the fix for the text protocol numeric array types as one of the commits touches the same line.

bendrucker commented 5 years ago

Would rather keep the changes a bit more minimal here. We can use package scripts and if anything remove the Makefile. We don't necessarily have to conform to pg and I'm very inclined to use standard and avoid future bike-shedding on linter rules.

sehrope commented 5 years ago

I don't particularly care which lint rules, just some would be nice. I picked eslint as that's what pg is currently using.

Tried out standard and running it atop the clean ups of this branch leaves only semi-colon rules. Let me know if you want to go that route.

bendrucker commented 5 years ago

Me neither, I like standard because it doesn't provide future opportunities for others to debate lint rules.

You can cut semi-colons entirely, I know it makes for a large diff but I think we just pay the cost now and have less to look at.

sehrope commented 5 years ago

Sounds good. Closing in favor of #94.