ESLint React configuration for JS projects based on airbnb and Prettier configs
npm install @imaginary-cloud/eslint-config-reactFor more information you can check ESLint and Prettier documentations as well the airbnb and prettier configurations for more information
This package integrates the Prettier rules with ESLint using our configuration. You can check it at @imaginary-cloud/prettier-configuration
#### NPM
```
npm install --save-dev eslint prettier
Install all peer dependencies of our configuration, these can be listed by the command:
``
npm info "@imaginary-cloud/eslint-config-react@latest" peerDependencies
If running npm > v5 you install them by:
``
npx install-peerdeps --dev @imaginary-cloud/eslint-config-react
If npm < v5, Linux/OSX users can run:
``
(
export PKG=@imaginary-cloud/eslint-config-react;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
#### YARN
``
yarn add eslint prettier -D
Install the peer dependencies tool, by running:
``
yarn global add install-peerdeps
and after that run the following command to install the project's config:
``
install-peerdeps @imaginary-cloud/eslint-config-react
`
"eslintConfig": {
"extends": "@imaginary-cloud/react",
},
"prettier": "@imaginary-cloud/prettier-config"
`Or create a
.eslintrc and .prettierrc files and add extends: "@imaginary-cloud/react" and "@imaginary-cloud/prettier-config" respectivally. As an example:
`
{
"extends": "@imaginary-cloud/react"
}
"@imaginary-cloud/prettier-config"
`To use ESLint and Prettier you can add this scripts to your
package.json file
`
"lint": "eslint ./ --ignore-path .gitignore",
"lint:fix": "npm run lint -- --fix",
"format": "prettier --write \"{,!(node_modules)/*/}.js\""
``Copyright © 2010-2020 Imaginary Cloud. This library is licensed under the MIT license.

At Imaginary Cloud, we build world-class web & mobile apps. Our Front-end developers and UI/UX designers are ready to create or scale your digital product. Take a look at our website and get in touch! We'll take it from there.