Open GroverW opened 4 years ago
I thought this was super helpful and maybe worth scoping out. Since you're using React I think there's a bunch of plugins you might need.
Info on possible plugins: https://github.com/react-boilerplate/react-boilerplate/blob/master/package.json
But basically
"scripts": { < ... other scripts > "eslint": "eslint --ignore-path .gitignore", "eslint:fix": "eslint --ignore-path .gitignore --fix", "lint": "npm run eslint -- . ", "lint:fix": "npm run eslint:fix -- . " }, "pre-commit": [ "lint:fix" ],
{ "extends": [ "airbnb" ] }
Forgot to add - once you have the scripts setup you can do "npm run eslint -- . " to test. As far as I can tell you can't run eslint directly unless you have it installed globally, so you gotta setup a script.
I thought this was super helpful and maybe worth scoping out. Since you're using React I think there's a bunch of plugins you might need.
Info on possible plugins: https://github.com/react-boilerplate/react-boilerplate/blob/master/package.json
But basically