@neuledge/eslint-config

1.3.0 • Public • Published

ESLint Default Config

Initial Setup

  1. Install the package:
pnpm add -D eslint husky lint-staged prettier @neuledge/eslint-config
  1. Create a .eslintrc.json file with the following content:
{
  "extends": "@neuledge"
}
  1. Create a .prettierrc.json file with the following content:
{
  "singleQuote": true
}
  1. Add the following scripts to your package.json:
{
  "scripts": {
    "fix": "pnpm lint:fix",
    "lint": "eslint . --ext \"js,ts,mjs,cjs\"",
    "lint:fix": "pnpm lint --fix",
    "lint:strict": "pnpm lint --max-warnings 0"
  }
}
  1. Add lint-state to the end of your package.json file:
{
  "lint-staged": {
    "*.{js,ts,mjs,cjs}": "eslint"
  }
}
  1. Install and configure husky:
pnpm husky init
echo 'NODE_OPTIONS="--max_old_space_size=4096" npx --no-save lint-staged' > .husky/pre-commit

Usage

Linting

pnpm lint

Fixing Linting Errors

pnpm fix

Strict Linting

(Best used in CI)

pnpm lint:strict

Readme

Keywords

none

Package Sidebar

Install

npm i @neuledge/eslint-config

Weekly Downloads

4

Version

1.3.0

License

MIT

Unpacked Size

4.5 kB

Total Files

3

Last publish

Collaborators

  • moshe