Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set rule object-shorthand 's ignoreConstructors to false make problems #688

Open
6 of 7 tasks
Yuliang-Lee opened this issue Mar 14, 2025 · 0 comments
Open
6 of 7 tasks

Comments

@Yuliang-Lee
Copy link

Describe the bug

我把项目的 eslint 规则升级了之后, 这个规则设置为 false 导致我项目里某些代码报错了,这里为什么要设为 false

cosnt a = {
  b() {
    // do something
  }
}

new a.b()

https://github.com/antfu/eslint-config/blob/main/src/configs/javascript.ts#L169

Reproduction

easy reproduction

System Info

System:
    OS: Linux 5.4 TencentOS Server 3.2 (Final)
    CPU: (16) x64 Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
    Memory: 23.58 GB / 31.10 GB
    Container: Yes
    Shell: 4.4.19 - /bin/bash
  Binaries:
    Node: 22.11.0 - ~/.nvs/node/22.11.0/x64/bin/node
    npm: 10.9.0 - ~/.nvs/node/22.11.0/x64/bin/npm
    pnpm: 9.14.2 - ~/.linuxbrew/bin/pnpm/pnpm

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Contributions

  • I am willing to submit a PR to fix this issue
  • I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant