Skip to content

Instantly share code, notes, and snippets.

@rakannimer
Last active August 14, 2018 07:42
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rakannimer/93bf9f84ae082ec50f65105f6d68a83a to your computer and use it in GitHub Desktop.
Save rakannimer/93bf9f84ae082ec50f65105f6d68a83a to your computer and use it in GitHub Desktop.
Adding react-airbnb styleguide linting to create-react-app
( 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
@rakannimer
Copy link
Author

More info here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment