/eslint-config-react

A shareable ESLint configuration for the development of Perfective React packages

Primary LanguageTypeScriptMIT LicenseMIT

Perfective ESLint Config for React

@perfective/eslint-config-react provides a shareable ESLint configuration for developing the @perfective React packages. This package extends the @perfective/eslint-config package.

@perfective/eslint-config-react uses the following ESLint plugins:

Setup

  1. Require @perfective/eslint-config-react and its peer dependencies as dev dependencies:

    npm install --save-dev \
        @perfective/eslint-config-react \
        @babel/eslint-parser \
        @typescript-eslint/eslint-plugin \
        @typescript-eslint/eslint-plugin-tslint \
        @typescript-eslint/parser \
        eslint \
        eslint-import-resolver-typescript \
        eslint-plugin-array-func \
        eslint-plugin-cypress \
        eslint-plugin-deprecation \
        eslint-plugin-eslint-comments \
        eslint-plugin-import \
        eslint-plugin-jest \
        eslint-plugin-jest-dom \
        eslint-plugin-jest-formatting \
        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 \
        tslint
  2. Require the configuration in your root .eslintrc.js.

    module.exports = {
        extends: ['@perfective/eslint-config-react'],
    }

Rules Configuration Extension Functions

This package re-exports rules configuration functions, including overrides with additional React customizations:

  • typescriptEslintNamingConvention(extensions);

  • unicornPreventAbbreviations(replacements, options).

Roadmap

  • Research more ESLint React plugins.