@leandromatos/eslint-config
v3.0.0-rc.25
Published
> [!IMPORTANT] > > **This package's version, v3.x, works with ESLint v9.x. If you are using an older version of ESLint, please use the package's version v2.x..** >
Downloads
591
Readme
ESlint Config
[!IMPORTANT]
This package's version, v3.x, works with ESLint v9.x. If you are using an older version of ESLint, please use the package's version v2.x..
This is a custom and sharable ESLint configuration for TypeScript, JavaScript, and React projects. It includes the following packages:
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- eslint-config-prettier
- eslint-plugin-import
- eslint-plugin-jsx-a11y
- eslint-plugin-prettier
- eslint-plugin-react-hooks
- eslint-plugin-react
- eslint-plugin-simple-import-sort
- eslint
- prettier-plugin-tailwindcss
- prettier
- typescript-eslint
Usage
[!NOTE]
It's crucial to note that you must install the
typescript
package, even in a project that uses only JavaScript. This is because ESLint leverages TypeScript to parse the code and provide more accurate error messages.
- Use yarn or another package manager to install the package. For example:
yarn add --dev eslint typescript @leandromatos/eslint-config
- Create a new
eslint.config.js
file in the root of your project and add the following content:
const { config } = require("@leandromatos/eslint-config")
module.exports = [
...config
]
- If you want to override some rules, you can do so by adding new configuration objects to the array. For example:
const { config } = require("@leandromatos/eslint-config")
module.exports = [
...config,
{
rules: {
"no-unused-vars": "warn"
}
}
]
License
This package is licensed under the MIT License. For more information, see the LICENSE file.