This config is two things:
- Heavily inspired by eslint-config-react-app.
- Turns off the rules that have to do with formatting, leaving it to Prettier to handle.
npx install-peerdeps --dev eslint-config-ryanditjia
Create config file (required)
.eslintrc.js file at the root of your project and paste the following:
moduleexports =extends: 'ryanditjia'rules:// your custom rules here
Ignore files and directories (optional)
Next, still at the root of your project, create a
.eslintignore file listing the files and directories that you want ignored by ESLint.
Run ESLint and Prettier with script
package.json, add the following scripts:
Run ESLint and Prettier in your code editor
In VSCode, install the ESLint (by Dirk Baeumer) and Prettier (by Esben Petersen) extensions.