@potidev/eslint-config

2.0.3 • Public • Published

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 .

/@potidev/eslint-config/

    Package Sidebar

    Install

    npm i @potidev/eslint-config

    Weekly Downloads

    17

    Version

    2.0.3

    License

    MIT

    Unpacked Size

    8.77 kB

    Total Files

    5

    Last publish

    Collaborators

    • potidev