Skip to content

prunus/eslint-config

Repository files navigation

@prunus/eslint-config

Installation

Full installation

yarn add -D @prunus/eslint-config;
npx install-peerdeps --dev @prunus/eslint-config;

or

yarn add -D @prunus/eslint-config eslint typescript

Add to your eslint config (.eslintrc, or eslintConfig field in package.json):

{
    "extends": "@prunus"
}

Installation using only JavaScript

yarn add -D eslint @prunus/eslint-config eslint-plugin-import-helpers

Add to your eslint config (.eslintrc, or eslintConfig field in package.json):

{
    "extends": "@prunus/eslint-config/js"
}

Installation using JavaScript and JSX

yarn add -D eslint @prunus/eslint-config eslint-plugin-import-helpers eslint-plugin-react eslint-plugin-react-hooks

Add to your eslint config (.eslintrc, or eslintConfig field in package.json):

{
    "extends": "@prunus/eslint-config/jsx"
}

Installation usign only TypeScript

yarn add -D eslint @prunus/eslint-config @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint-plugin-import-helpers typescript

Add to your eslint config (.eslintrc, or eslintConfig field in package.json):

{
  "extends": "@prunus/eslint-config/ts"
}

Installation using TypeScript and JSX

It's the same thing as full installation

Setup

Follow scripts create:

npm set-script lint "eslint ."
npm set-script lint:fix "eslint . --fix"

Setup with husky using yarn:

npx husky add .husky/pre-push 'yarn lint'

Setup with husky using npm:

npx husky add .husky/pre-push 'npm run lint'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages