@jdion/eslint-config

npm (opens in a new tab)

  • Lint and format code (No Prettier)
  • Designed to work with TypeScript, React
  • Lint support for json, yaml, markdown files
npm install -D eslint @jdion/eslint-config

Usage

Create a ESLint configuration file .eslintrc with:

{
  "extends": "@jdion"
}

Add lint scripts

In your package.json add the following scripts:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

FAQ

Why not using Prettier?

I prefer to use ESLint for formatting my code as it provides more fine-grained customization options. In addition to linting, ESLint can also be used to format code according to your preferences. Personally, I don't find the printWidth feature in Prettier to be particularly useful for my projects, so I choose to stick with ESLint.