pmndrs / react-zdog

⚡️🐶 React bindings for zdog
MIT License
443 stars 21 forks source link

Add ESLint #1

Closed vmarchesin closed 1 year ago

vmarchesin commented 5 years ago

The project is currently missing ESLint. I think it would be a good idea to add it.

I created a diff with the airbnb preset, minus a few rules that don't break the current code style. I think the semi rule should be enforced at least.

Also I moved the index file to a src folder to avoid running lint on the examples folder, plus preparing it for a possible code split.

What are your opinions on this?

drcmda commented 5 years ago

Sure, that would be super nice. 👍 All my code is semi:false though, that one I just got used to.

vmarchesin commented 5 years ago

Just to be clear, I think the husky pre-commit shouldn't format the code, but just prevent a push. The way it is right now the pre-commit auto formats the code and pushes it, making changes to your code. That could lead to bad formatted code (or in case of semi: false potential semicolon auto insertion bugs.

I'll see what I can do with this.

drcmda commented 5 years ago

Have good experiences with it, were using husky at work and it’s in all my projects. I have come to completely trust prettier and it’s never let me hang. 🤗 I would be interested in basic code linting, especially for React and hooks. I’ve always wanted to set it up but never got to it.