1.0.1 • Published 4 years ago
@autograders/eslint-config-react v1.0.1
This package provides @autograders react .eslintrc as an extensible shared ESLint config.
1) Installation
If you are using NPM:
npm install --save-dev @autograders/eslint-config-reactIf you are using Yarn:
yarn add --dev @autograders/eslint-config-react2) Create a .eslintrc.js file
Create a .eslintrc.js in the same directory where package.json is with the following content:
module.exports = {
extends: ['@autograders/eslint-config-react']
};3) Add a lint script inside package.json
{
"scripts": {
"lint": "eslint \"{src,pages}/**/*.{tsx,ts}\" --fix"
}
}If you are using NextJS 11 or greater:
{
"scripts": {
"lint": "next lint --fix"
}
}4) Test lint
If you are using NPM:
npm run lintIf you are using Yarn:
yarn lint