I've been able to use the npm package eslint-config-rallycoding
in multiple react and react native projects, but I run into issues when trying it with create-react-app
. Are there additional steps I need to do?
Usually all that is needed is:
npm i --save-dev eslint-config-rallycoding
{ "extends": "rallycoding" }
to the .eslintrc fileI am using sublime text 3 and this works with other projects just fine. I know create-react-app has a bunch of extra boilerplate, perhaps there's something I need to override?
https://www.npmjs.com/package/eslint-config-rallycoding https://github.com/facebookincubator/create-react-app
After reading the following lines in the create-react-app readme, I noticed there is already linting included:
You would need to install an ESLint plugin for your editor first. Then, add a file called
.eslintrc
to the project root:
js { "extends": "react-app" }
Now your editor should report the linting warnings.
To customize it further with a specific linting package like the above, you would need to eject to run npm run eject
which would remove the single build dependency from your project allowing customization to babel, webpack, and eslint files.