@pepeeja/eslint-config-react

18.0.2 • Public • Published

@pepeeja/eslint-config-react

license npm latest package

ESLint and Prettier setup for React project

Install

// with npm
npm install @pepeeja/eslint-config-react

// with yarn
yarn add @pepeeja/eslint-config-react

Usage

Prettier

This package contains two configurations one for ESLint and Prettier.

Prettier could be configured by creating .prettierrc file in the root directory of your project with the following content:

"@pepeeja/eslint-config-react/prettier"

ESLint configuration has several options based on used environment. You can find list of available configurations below.

ESLint

To apply React specific rules create .eslintrc file in the root directory of your project with the following content:

{
  "extends": "@pepeeja/eslint-config-react"
}

To setup Typescript integration provide additional configuration in .eslintrc file:

"parserOptions": {
  "ecmaVersion": 2022,
  "project": ["tsconfig.json"],
  "sourceType": "module"
}

To enable Typescript path aliases provide configuration for import resolver in .eslintrc file:

"settings": {
  "import/resolver": {
    "typescript": {
      "project": "tsconfig.json"
    }
  }
}

License

This project is licensed under the terms of the MIT License

/@pepeeja/eslint-config-react/

    Package Sidebar

    Install

    npm i @pepeeja/eslint-config-react

    Weekly Downloads

    1

    Version

    18.0.2

    License

    MIT

    Unpacked Size

    7.94 kB

    Total Files

    5

    Last publish

    Collaborators

    • mrcatlait