Bug: [no-array-constructor] Does not detect Array
call with optional chaining
#10933
Closed
4 tasks done
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
bug
Something isn't working
locked due to age
Please open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
https://typescript-eslint.io/play/#ts=5.8.2&fileType=.ts&code=IIJxEME8AoEoG4BQjQUgfgHR3kA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQHYHsBaAQ2mmIE9CBjfXZAFzmof2nSnwDMvIAacNkgABBhQAOKatACW4hoRTwZuBgHoCJMpRp1GzVuwyREZNpEEBfEJaA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
Array?.()
should be reported the same wayArray()
is.Actual Result
No report.
Additional Info
Array?.()
is reported in the core rule: https://eslint.org/play/#eyJ0ZXh0IjoiLyplc2xpbnQgbm8tYXJyYXktY29uc3RydWN0b3I6IFwiZXJyb3JcIiovXG5cbkFycmF5KCk7XG5cbkFycmF5Py4oKTsiLCJvcHRpb25zIjp7InJ1bGVzIjp7fSwibGFuZ3VhZ2VPcHRpb25zIjp7InBhcnNlck9wdGlvbnMiOnsiZWNtYUZlYXR1cmVzIjp7fX19fX0=💖
The text was updated successfully, but these errors were encountered: