@potidev/eslint-config
v2.0.3
Published
ESLint configuration used by Potidev
Downloads
22
Maintainers
Readme
Potidev - ESLint Config
Whats included?
- Standard config base;
- React plugin;
- React Hooks plugin;
- JSX a11y plugin;
- Prettier;
Setup - React (with Next.js)
Install dependencies:
npm i -D eslint @potidev/eslint-config
Inside .eslintrc.json
{
"extends": [
"@potidev/eslint-config/next",
"next/core-web-vitals"
]
}
It is recommended to create a .eslintignore
file with this content:
node_modules
.next
.vscode
/*.js
**/*.svg
After install, run to start on Next:
npm run lint
Setup - React (without Next.js) or React Native
Install dependencies:
npm i -D eslint @potidev/eslint-config
Inside .eslintrc.json
{
"extends": "@potidev/eslint-config/react"
}
It is recommended to create a .eslintignore
file with this content:
node_modules
.next
.vscode
/*.js
**/*.svg
android
ios
After install, run to start on React:
npm run lint
If your project does not have the "lint" script configured, use the command:
npx eslint --ext .js,.jsx,.ts,.tsx .
Tips
To fix all files, use the command:
npm run lint --fix
If your project does not have the "lint" script configured, use the command:
npx eslint --fix --ext .js,.jsx,.ts,.tsx .