Shareable ESLint configuration settings linked with Prettier. ESLint formatting rules are disabled, then re-enabled through the eslint-prettier plugin. This way the formatting rules still get applied and Prettier formatting won't conflict with ESLint linting.
No errors, only warnings.
- NodeJS and NPM installed
- Project set up with NodeJS and a package.json
- Navigate to the root directory of your project
npm i eslint@latest prettier@latest
npm i @typescript-eslint/eslint-plugin@latest eslint-plugin-react@latest eslint-plugin-prettier@latest
npm i @wildpastry/eslint-config@latest
.eslintrc
{ "extends": "@wildpastry/eslint-config" }
These scripts will check/fix linting and formatting. Not everything can be automatically fixed.
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\"",
"lint:fix": "eslint --fix \"**/*.{js,jsx,ts,tsx}\"",
"format": "npx prettier --check \"**/*.{js,jsx,ts,tsx}\"",
"format:fix": "npx prettier --write \"**/*.{js,jsx,ts,tsx}\"",
"clean": "npx prettier --write \"**/*.{js,jsx,ts,tsx}\" && npm run lint:fix"