Skip to content

eggjs/eslint-config-egg

Repository files navigation

eslint-config-egg

NPM version build status Test coverage Known Vulnerabilities npm download

Node.js Style Guide for EggJS

Install

npm i eslint eslint-config-egg --save-dev

Usage

Use with JavaScript project

  • package.json
{
  "devDependencies": {
    "eslint-config-egg": "14",
    "eslint": "8"
  }
}
  • .eslintrc
{
  "extends": [
    "eslint-config-egg"
  ]
}

Use with TypeScript project

  • package.json
{
  "devDependencies": {
    "eslint-config-egg": "13",
    "typescript": "5"
  }
}
  • .eslintrc
{
  "extends": [
    "eslint-config-egg/typescript"
  ]
}
  • scripts
{
  "lint": "eslint . --ext .ts"
}
  • settings.json in vscode
{
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    {
      "language": "typescript",
      "autoFix": true
    }
  ]
}

License

MIT

Contributors

Contributors

Made with contributors-img.