A TypeScript and
ESLint v8 (legacy eslintrc
) config for
Estudio Cactus's projects using
Prettier for code formatting inside eslintrc
file.
NOTE: To format using Prettier, defined in
eslintrc
file, you need to default your formatter to useeslint
in your editor.
This package requires Node.js greater than or equal to 18.20.0.
# use npm, yarn, pnpm
npm install --save-dev @estudio-cactus/eslint-config
NOTE: Yarn doesn't install peer dependencies, so you need to install them manually.
yarn add --dev \ typescript@\* \ eslint@^8.0.1 \ eslint-config-sotecla
If you want to use the NextJS config, you need to install the following packages if they are not already installed:
# use npm, yarn, pnpm
npm install --save-dev @next/eslint-plugin-next
Add this to your .eslintrc.cjs
file:
module.exports = {
extends: ['@estudio-cactus/eslint-config'] // or '@estudio-cactus/eslint-config/nextjs' for NextJS projects
// it can also be used as `'@estudio-cactus'` and `'@estudio-cactus/nextjs'` for NextJS projects
// ...
}