eslint-config-ryanditjia
v3.3.0
Published
ESLint config heavily inspired by create-react-app, with addition of prettier
Downloads
12
Maintainers
Readme
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:
module.exports = {
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_modules
public
.cache
your_additional_folder
Run ESLint and Prettier with script
In your package.json
, add the following scripts:
{
"format": "prettier --write \"*.js\" \"src/**/*.js\"",
"lint": "eslint ./ --ext .js --ext .jsx"
}
Run ESLint and Prettier in your code editor
In VSCode, install the ESLint (by Dirk Baeumer) and Prettier (by Esben Petersen) extensions.