ESLint configuration for Ridecell React apps
NOTE: This is not the same https://www.npmjs.com/package/eslint-config-react
Run the following command in your project root directory:
yarn add --dev @ridecell/eslint-config-react
Then you need to create 3 files:
-
.eslintrc
with the following content:
{
"parser": "babel-eslint",
"extends": "@ridecell/eslint-config-react"
}
-
.prettierrc.js
with the following content:
module.exports = require('@ridecell/eslint-config-react/.prettierrc')
-
.prettierignore
with the following content:
*.json
node_modules
dist
That's it! You can always override those setting.
You can add the following 2 commands to your package.json
scripts
-
"prettier-changed": "pretty-quick",
- prettifies only the files that were changed -
"prettier-all": "prettier --write \"**/*.{js,jsx}\""
- prettifies all the files
To test changes to the lint rules against code, use npm-link
in a project. Helpful guide