Skip to content

Configuration file for ESLint

License

Notifications You must be signed in to change notification settings

dopustim/eslint-config

Repository files navigation

ESLint Configuration

Configuration for ESLint

NPM

Features

  • Provide Errors and Warnings
  • 4 spaces for indentation (warning)
  • 90 symbols per line (warning)
  • Unix linebreaks (warning)

Usage

Install eslint and @dopustim/eslint-config packages via NPM:

npm install -D eslint @dopustim/eslint-config

Extend this config in your .eslintrc.json:

{
    "extends": "@dopustim/eslint-config"
}

Or use your package.json:

"eslintConfig": {
    "extends": "@dopustim/eslint-config"
}

You can also set environment and reassign any rule for your needs:

{
    "extends": "@dopustim/eslint-config",
    "env": {
        "browser": true,
        "es2020": true,
        "node": true
    },
    "parserOptions": {
        "sourceType": "module",
        "ecmaVersion": 2020
    },
    "rules": {
        "max-len": [ 1, { "code": 100 } ]
    }
}

About

Visit the ESLint website to find out all rules and descriptions.