We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
prefer-readonly-array
Enforces an array argument of a function to be declared as readonly if it's never mutated in the function body.
readonly
function getValues( items: { value: number }[] // Should be readonly! ) { return items.map(item => item.value) }
Rationale: https://x.com/leishenghao/status/1664067474097332224?s=46&t=A5GTMNUCLTkLO8tQ8jEQJA
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Enforces an array argument of a function to be declared as
readonly
if it's never mutated in the function body.Rationale: https://x.com/leishenghao/status/1664067474097332224?s=46&t=A5GTMNUCLTkLO8tQ8jEQJA
The text was updated successfully, but these errors were encountered: