0.0.2 • Published 1 year ago
eslint-config-enhanced v0.0.2
eslint-config-enhanced
Sharable eslint config for react projects with Typescript
Description
This configuration itself extends other already existing recommended and widely used configuration that are listed below.
- airbnb
- airbnb-typescript
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- prettier
Usage
- Install the package.
You can use package manager of your choice (npm|yarn|pnpm). I'm gonna stick with pnpm
pnpm add eslint-config-enhanced -D
- Peer dependencies must be installed automatically but if that's not the case you can install them manually. You can view the list of them by running:
pnpm info eslint-config-enhanced peerDependencies
- Install all required peer dependencies as dev dependencies.
pnpm add eslint@^8.56.0 \
@typescript-eslint/eslint-plugin@^7.9.0 \
eslint-config-airbnb@^19.0.4 \
eslint-plugin-import@^2.25.3 \
eslint-plugin-jsx-a11y@^6.5.1 \
eslint-plugin-react@^7.28.0 \
eslint-plugin-react-hooks@^4.3.0 \
eslint-config-prettier -D
- In
.eslintrc.(js|mjs|cjs)
add this config to theextends
field.
// .eslintrc.cjs
module.exports = {
extends: ["enhanced"],
// You might also need following line
parserOptions: { project: ["./tsconfig.json"] },
// other configurations...
};