ESLint, TypeScript, Airbnb and Prettier configurations for use with Node.js and React
name | javascript | typescript | typescript-react |
---|---|---|---|
@typescript-eslint/eslint-plugin | x | x | |
@typescript-eslint/parser | x | x | |
eslint | x | x | x |
eslint-config-airbnb | x | ||
eslint-config-airbnb-base | x | x | x |
eslint-config-prettier | x | x | x |
eslint-import-resolver-typescript | x | x | |
eslint-plugin-import | x | x | x |
eslint-plugin-jsx-a11y | x | ||
eslint-plugin-prettier | x | x | x |
eslint-plugin-react | x | ||
eslint-plugin-react-hooks | x | ||
eslint-plugin-unused-imports | x | x | x |
prettier | x | x | x |
typescript | x | x |
This setup treats the specific configurations for JavaScript, TypeScript and TypeScript + React as first class citizens.
What this means is the following:
- Only installs required peer dependencies for language specific configurations.
- Override-based configurations, not a one size fits all configuration.
Install this configuration in your project
yarn add eslint-config-popcorn
Install peer dependencies
npx eslint-config-popcorn installPeerDeps javascript
Update your eslint configuration
{
extends: ["popcorn/javascript"]
}
Install peer dependencies
npx eslint-config-popcorn installPeerDeps typescript
Update your eslint configuration
{
extends: ["popcorn/typescript"]
}
Install peer dependencies
npx eslint-config-popcorn installPeerDeps typescript-react
Update your eslint configuration
{
extends: ["popcorn/typescript-react"]
}