Skip to content

Latest commit

 

History

History
107 lines (82 loc) · 1.99 KB

README.md

File metadata and controls

107 lines (82 loc) · 1.99 KB

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.