1.0.1 • Published 2 years ago

@webbergreg/eslint-config v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

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",
      	}
      }