Skip to content

eslint-config 1.1.1

Install from the command line:
Learn more about npm packages
$ npm install @neuledge/eslint-config@1.1.1
Install via package.json:
"@neuledge/eslint-config": "1.1.1"

About this version

ESLint Default Config

Initial Setup

  1. Install the package:
yarn add -DW 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": {
    "prepare": "husky install || echo \"skip husky\"",
    "fix": "yarn lint:fix",
    "lint": "eslint . --ext \"js,ts,mjs,cjs\"",
    "lint:fix": "yarn lint --fix",
    "lint:strict": "yarn 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:
yarn prepare
yarn husky add .husky/commit-msg 'NODE_OPTIONS="--max_old_space_size=4096" npx --no-save lint-staged'

Usage

Linting

yarn lint

Fixing Linting Errors

yarn fix

Strict Linting

(Best used in CI)

yarn lint:strict

Details


Assets

  • eslint-config-1.1.1.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0