eslint-config-ryanditjia
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.
Install
npx install-peerdeps --dev eslint-config-ryanditjia
Usage
Create config file (required)
Create a .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.
node_modulespublic.cacheyour_additional_folder
Run ESLint and Prettier with script
In your 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.