rough-stuff / rough

Create graphics with a hand-drawn, sketchy, appearance
http://roughjs.com
MIT License
19.83k stars 613 forks source link

introduce ESLint #174

Closed 43081j closed 3 years ago

43081j commented 3 years ago

tslint has long been deprecated and unnecessary, so i've removed it and added eslint along with the typescript plugin for it.

let me know if its something you want to merge.

FYI your rules are very similar to google's too, so it might be worth just inheriting eslint-config-google instead of toggling your own rules on and off.

also, you have this line of code i noticed:

https://github.com/rough-stuff/rough/blob/bc460dd98eca1f6c4eb8104794931960f0b078ca/src/generator.ts#L170

did you mean to write '/(\\s\\s)/g'? the last pattern is in quotes so it looks like you'll end up with /(ss)/g which i can't imagine was the intention 👀

cc @pshihn

43081j commented 3 years ago

@pshihn i rebased onto master in case you ever want to merge this. TSLint is long gone, would be worth while moving over

pshihn commented 3 years ago

Thanks for doing this and sorry for ignoring this for so long. Let me try it out tonight and let you know

43081j commented 3 years ago

don't worry about it, there's been more important things to do :D

let me know if you want any changes and what you think about the regex i pointed out too 👍

pshihn commented 3 years ago

Honestly I don't recall the regex issue but seems like you're right. I have created an issue https://github.com/rough-stuff/rough/issues/180 to look at it

Regarding the linting, I think it looks good. I am not a fan of dangling commas, but I know it seems to be the popular choice so I am going to live with it and see what I think. Thanks again for this!

43081j commented 3 years ago

Funnily enough I'm not a fan either 😂 but saw a couple in the original code from what I remember so left it turned on.

Thanks for taking the time to look at this and get it merged too