Eslint rules to enforce Viralize standards and best practices during development of react project in Viralize
- Install the correct versions of each package, which are listed by the command:
npm info "eslint-config-viralize-react@latest" peerDependencies
If using npm 5+, use this shortcut
npx install-peerdeps --dev eslint-config-viralize-react
If using npm < 5, Linux/OSX users can run
(
export PKG=eslint-config-viralize-react;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
If using npm < 5, Windows users can either install all the peer dependencies manually, or use the install-peerdeps cli tool.
npm install -g install-peerdeps
install-peerdeps --dev eslint-config-viralize-react
- Add
"extends": "viralize-react"
to your .eslintrc.