Bug: [no-unnecessary-type-assertion] should report readonly
class properties with a literal initializer
#10617
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.7.2&fileType=.ts&code=C4TwDgpgBAylC8UCMAGA3AKAwem1AThGAPb7AQAmUAxqYdcADYga0B2AzsFAIYJQByHgN4caxTsEzsuUAEb8AzKKiLpE2dX6oVMTK0Y8OYgCpQA3hihRcUDgAtiAV0ZU50QiTKUA-FYIQPBQSzLz8QiJG4pL%2BhEEhIPJKKoqxgcFsoVqIOlEwGAC%2BQA&eslintrc=N4KABGBEBOCuA2BTAzpAXGUEKQAIBcBPABxQGNoBLY-AWhXkoDt8B6Jge1tiacTJTIAhtEK0ipWkOTJE0fJQ5N0UOdA7RI4MAF8QOoA&tsconfig=N4KABGBEDGD2C2AHAlgGwKYCcDyiAuysAdgM6QBcYoEEkJemy0eAcgK6qoDCAFutAGsylBm3TgwAXxCSgA&tokens=false
Repro Code
ESLint Config
tsconfig
Expected Result
I expected these to be reported, similarly to the
const
declarations.Actual Result
The various
readonly
declarations haven't been reported.Additional Info
No response
The text was updated successfully, but these errors were encountered: