1.0.3 • Published 1 year ago

eslint-config-leonardopn v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-config-leonardopn

This is a ESLint config for my personal projects based on eslint-config-rocketseat

Whats included?

  • Standard config base;
  • React plugin(Changed by me);
  • React Hooks plugin;
  • JSX a11y plugin;
  • Prettier(changed by me);

Setup

  1. Install the dependencies
npm i -D eslint eslint-config-leonardopn
  1. Create a .eslintrc.json file extending the config:
{
  "extends": "eslint-config-leonardopn/react"
}

You can also use a .eslintrc.js instead of JSON if you prefer.

if you use VsCode prettier formatter

  1. (Optional) Create a .prettierrc.js file extending the config:
const prettier = require("eslint-config-leonardopn/prettier");

module.exports = prettier;

You can override the default prettier file, but update also the file .eslintrc.js for prevent incompatibility between rules Eslint.

Example:

//.prettierrc.js
const prettier = require("eslint-config-leonardopn/prettier");

module.exports = {
  ...prettier,
  semi: false,
};
//.eslintrc.js
module.exports = {
  extends: ["eslint-config-leonardopn/react"],
  rules: {
   "prettier/prettier": ["error", { semi: false }],
  },
};

License

This ESlint config is licensed by MIT License - LICENSE for more details.