Professional grade Eslint configuration targeted for typescript & react projects
An ESLint configuration package designed to provide a consistent and performant code linting setup for JavaScript and TypeScript projects, with or without React.
It extends popular ESLint configurations, incorporates rules to prevent conflicts with Prettier, and includes environment settings for browser, Node.js, and ECMAScript 2021.
This package aims to streamline your development workflow by maintaining code quality and ensuring a consistent coding style across your projects.
It makes use of the recommended settings of each plugin, and extends with extra configuration not present on the recommended preset.
Used plugins / configs:
- [x] Eslint
- [x] Typescript (Eslint)
- [x] Workspaces
- [x] TSDoc
- [x] React
- [x] React Hooks
- [x] React Refresh
- [x] Imports
- [ ] Import Helpers
- [x] Prettier
- [ ] Unicorn (TODO)
- [x] Etc
- [x] Jest
- [x] jsx-a11y
- [x] Eslint Comments
- [ ] Stylistic (TODO)
- [ ] N (TODO)
- [ ] Compat (TODO)
- [ ] Promise
To achieve maximum consistency, use along with prettier-config-pro;
You can install this config via npm or yarn:
npm install @abelflopes/eslint-config-tsr-pro --save-dev
# or
yarn add @abelflopes/eslint-config-tsr-pro --dev
To use this configuration in your project, create an ESLint configuration file
(e.g., .eslintrc.js) and extend @abelflopes/eslint-config-tsr-pro
:
// .eslintrc.js
module.exports = {
extends: '@abelflopes/eslint-config-tsr-pro',
// Add any project-specific overrides or rules here
};
If you encounter any issues with this ESLint configuration or have suggestions for improvements, please visit the GitHub repository and open an issue or pull request. Check also the development docs.