Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-egg

eggjs81.4k14.1.0

Node.js Style Guide for EggJS

readme

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.

changelog

Changelog

14.1.0 (2025-01-21)

Features

14.0.0 (2024-06-29)

⚠ BREAKING CHANGES

  • drop Node.js < 18.19.0 support

new features:

  • support es2022 by default
  • enable enforce-node-prefix by default

other breaking changes:

  • remove react rules
  • remove babel
  • drop TypeScript < 5 support

Features

  • enable enforce-node-prefix by default (#73) (a6802b0)

13.1.0 (2023-12-18)

Features

13.0.0 (2023-09-17)

⚠ BREAKING CHANGES

  • Drop Node.js < 16 support
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0

YOUR TYPESCRIPT VERSION: 5.2.2

Please only submit bug reports when using the officially supported version.

Features

  • avoid @typescript-eslint/typescript-estree warning message (#69) (#70) (2189460)

12.3.1 (2023-09-17)

Reverts

  • Revert "feat: avoid @typescript-eslint/typescript-estree warning message (#69)" (1923200), closes #69

12.3.0 (2023-09-16)

Features

  • avoid @typescript-eslint/typescript-estree warning message (#69) (afde702)

12.2.1 (2023-03-25)

Bug Fixes

  • enforce-node-prefix rule should support on commonjs (#68) (b1a1316)

12.2.0 (2023-03-24)

Features

  • Add enforce "node:" prefix rule on import module (#67) (5a1aa4e)

12.1.0 / 2022-09-29

others

12.0.0 / 2022-06-04

others

11.1.0 / 2022-05-07

features

11.0.1 / 2022-02-21

fixes

11.0.0 / 2022-02-16

features

fixes

10.0.0 / 2021-11-24

features

9.0.0 / 2020-11-11

features

  • [f4bcafe] - feat: 修改 rules/node 中已被 eslint 废弃的 node rules,引入 eslint-plugin-node 及自定规则 (#57) (zhaoxingyue <zxy.node.js@gmail.com>)

8.1.2 / 2020-09-01

fixes

8.1.1 / 2020-08-31

fixes

8.1.0 / 2020-08-28

features

8.0.1 / 2020-01-20

fixes

8.0.0 / 2019-12-03

features

7.5.1 / 2019-08-27

fixes

7.5.0 / 2019-08-23

features

others

7.4.1 / 2019-05-06

fixes

7.4.0 / 2019-05-06

features

7.3.1 / 2019-03-27

fixes

7.3.0 / 2019-03-26

features

others

7.2.0 / 2019-03-11

features

7.1.0 / 2018-08-25

features

others

7.0.0 / 2018-02-24

  • feat: add eslint-plugin-eggache && drop support 4.x (#34)

6.0.0 / 2017-12-26

others

5.1.1 / 2017-09-04

fixes

5.1.0 / 2017-08-25

  • feat: disable browser env on node (#31)

5.0.0 / 2017-06-28

  • feat: upgrade eslint-plugin-jsx-a11y (#30)
  • feat: BREAKING_CHANGE upgarde eslint-plugin-react (#29)

4.2.1 / 2017-06-12

  • fix: remove unused ecmaFeatures, compatible with eslint4 (#28)

4.2.0 / 2017-05-25

  • feat: disable forbid-prop-types and require-default-props (#26)

4.1.0 / 2017-05-09

  • deps: peerDeps to deps (#24)

4.0.0 / 2017-05-06

  • feat: support es8 by default (#23)
  • feat: add React rules (#22)

3.2.0 / 2016-11-03

  • feat: disable no-useless-escape (#21)
  • doc: reference about trailing commas (#19)

3.1.0 / 2016-07-13

  • doc: add more usage in readme (#18)
  • feat: sourceType, no-extra-parens, brace-style, no-console (#17)

3.0.3 / 2016-07-12

  • fix: should work with eslint 3 (#16)

3.0.2 / 2016-07-12

  • fix: change rules that should not use (#15)

3.0.1 / 2016-07-08

  • fix: miss legacy (#13)

3.0.0 / 2016-07-08

  • refactor: refactor all rules based on eslint-config-airbnb and old ones, and classify them by category. (#11)

2.1.0 / 2016-03-11

  • docs: update README.md
  • deps: add peerDependencies

2.0.0 / 2016-03-04

  • feat: enable ecmaVersion 6
  • feat: remove consistent-return
  • upgrade eslint to 2.0.0

1.0.3 / 2016-01-11

  • ignore @return when function is not returnd

1.0.2 / 2015-12-18

  • allow foo == undefined
  • reflect: 修改switch-case 的缩进策略

1.0.0 / 2015-11-13

First Version