1.6.11 • Published 2 months ago

@admmello/eslint-config v1.6.11

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

admmello ESLint config

Whats included?

  • Standard config base;
  • React plugin;
  • React Hooks plugin;
  • JSX a11y plugin;
  • Prettier;

Setup

  1. Install the dependencies
npm i -D eslint @admmello/eslint-config

yarn add -D eslint @admmello/eslint-config
  1. Create a .eslintrc.json file extending the config:

with Next.js

{
  "extends": ["@admmello/eslint-config/next", "next/core-web-vitals"]
}

without Next.js

{
  "extends": "@admmello/eslint-config/react"
}

Node.js

{
  "extends": "@admmello/eslint-config/node"
}
  1. In your settings.json avoid "editor.formatOnSave": true as a global parameter.

  2. Still in setting.json add

  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.addMissingImports": "explicit",
    "source.organizeImports": "explicit"
  },