https://github.com/perfective/eslint-config-react
A shareable ESLint configuration for the development of Perfective React packages
https://github.com/perfective/eslint-config-react
code-quality code-style eslint eslint-config lint react typescript
Last synced: 8 months ago
JSON representation
A shareable ESLint configuration for the development of Perfective React packages
- Host: GitHub
- URL: https://github.com/perfective/eslint-config-react
- Owner: perfective
- License: mit
- Created: 2021-01-06T11:08:00.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-01T15:49:08.000Z (about 1 year ago)
- Last Synced: 2025-07-04T15:47:27.691Z (9 months ago)
- Topics: code-quality, code-style, eslint, eslint-config, lint, react, typescript
- Language: TypeScript
- Homepage:
- Size: 5.43 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
- Changelog: CHANGELOG.adoc
- License: LICENSE
Awesome Lists containing this project
README
= Perfective ESLint Config for React
`@perfective/eslint-config-react` provides
a https://eslint.org/docs/latest/developer-guide/shareable-configs[shareable ESLint configuration]
for developing the `@perfective` https://reactjs.org[React] packages.
This package extends the
`link:https://www.npmjs.com/package/@perfective/eslint-config[@perfective/eslint-config]` package.
`@perfective/eslint-config-react` uses the following ESLint plugins:
* `link:https://github.com/jsx-eslint/eslint-plugin-react[eslint-plugin-react]`;
* `link:https://www.npmjs.com/package/eslint-plugin-react-hooks[eslint-plugin-react-hooks]`;
* `link:https://github.com/correttojs/eslint-plugin-react-hooks-ssr[eslint-plugin-react-hooks-ssr]`;
* `link:https://github.com/cvazac/eslint-plugin-react-perf[eslint-plugin-react-perf]`;
* `link:https://github.com/jsx-eslint/eslint-plugin-jsx-a11y[eslint-plugin-jsx-a11y]`.
== Setup
. Require `@perfective/eslint-config-react` and its peer dependencies as dev dependencies:
+
[source,bash]
----
npm install --save-dev \
@perfective/eslint-config-react \
@babel/eslint-parser \
@typescript-eslint/eslint-plugin \
@typescript-eslint/parser \
eslint \
eslint-import-resolver-typescript \
eslint-plugin-array-func \
eslint-plugin-cypress \
eslint-plugin-eslint-comments \
eslint-plugin-import \
eslint-plugin-jest \
eslint-plugin-jest-dom \
eslint-plugin-jsdoc \
eslint-plugin-jsx-a11y \
eslint-plugin-n \
eslint-plugin-prefer-arrow \
eslint-plugin-promise \
eslint-plugin-react \
eslint-plugin-react-hooks \
eslint-plugin-react-hooks-ssr \
eslint-plugin-react-perf \
eslint-plugin-rxjs \
eslint-plugin-security \
eslint-plugin-simple-import-sort \
eslint-plugin-sonarjs \
eslint-plugin-testing-library \
eslint-plugin-unicorn
----
+
. Require the configuration in your root `.eslintrc.js`.
+
[source,javascript]
----
module.exports = {
extends: ['@perfective/eslint-config-react'],
}
----
== Rules Configuration Extension Functions
This package re-exports
https://github.com/perfective/eslint-config#rules-configuration-extension-functions[rules configuration functions],
including overrides with additional React customizations:
* `typescriptEslintNamingConvention(extensions)`;
* `unicornPreventAbbreviations(replacements, options)`.
== Roadmap
* Research more ESLint React plugins.