@webbergreg/eslint-config

1.0.1 • Public • Published

eslint-config

My shared ESLint config.

Overview

This repository contains ESLint configurations for the following setups:

  • TypeScript with React

They are designed to be used together with Prettier.

Usage

  1. Install the required packages:

    • TypeScript with React:
    npm i -D @webbergreg/eslint-config \
       @typescript-eslint/eslint-plugin \
       @typescript-eslint/parser \
       eslint \
       eslint-config-prettier \
       eslint-plugin-import \
       eslint-plugin-prefer-arrow \
       eslint-plugin-unused-imports
  2. Create the following entry in your package.json file:

    • TypeScript with React:
     {
     	"eslintConfig": {
     		"root": true,
     		"extends": ["@webbergreg/eslint-config/typescript-react"]
     	}
     }
  3. Add a linting script to your package.json file:

    • TypeScript with React:

      {
      	"scripts": {
             "lint": "npx eslint \"./src/**/*.*\"",
             "lint-fix": "npm run lint -- --fix",
      	}
      }

Readme

Keywords

none

Package Sidebar

Install

npm i @webbergreg/eslint-config

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

7.8 kB

Total Files

3

Last publish

Collaborators

  • webbergreg