Last active
August 14, 2018 07:42
-
-
Save rakannimer/93bf9f84ae082ec50f65105f6d68a83a to your computer and use it in GitHub Desktop.
Adding react-airbnb styleguide linting to create-react-app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"; ) | |
yarn add babel-eslint | |
echo "{ | |
\"parser\": \"babel-eslint\", | |
\"env\": { | |
\"browser\": true, | |
\"node\": true, | |
\"jest\": true, | |
}, | |
\"extends\": \"airbnb\", | |
\"rules\": { | |
\"react/jsx-filename-extension\": [1, { \"extensions\": [\".js\", \".jsx\"] }], | |
\"import/prefer-default-export\": \"off\", | |
\"no-bitwise\": \"off\", | |
\"react/prop-types\": \"off\", | |
\"react/prefer-stateless-function\": \"off\", | |
} | |
}" > ./.eslintrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More info here.