React project for setting up ESLint.
Below command will run the project:
npm run server npm run dev For running the server, install json-server globally:
npm install -g json-server Below command executed to perform initial setup:
npm create vite@latest # project name: react-eslint # framework: react # variant: JavaScript + SWC cd react-eslint npm i Run command:
npm run lint Add new script:
"lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", "lint:html": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0 --format html > lint.html", Add ESLint ignore file .eslintignore:
node_modules/ dist/ .prettierrc.cjs .eslintrc.cjs Refer: https://eslint.org/