-
Notifications
You must be signed in to change notification settings - Fork 84
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
Enforce TS's readonly
more strictly
#3126
Comments
Via this comment It's more likely we can find new linter plugins to enable. There are some suggestions on the TypeScript bug thread, e.g.: |
I don't think I have run into this specific issue in a while, so I am going to close this. |
Oh, I forgot we had this bug filed. I'd actually like to keep this open, as this hole could still let some bugs bypass the safety checks in #3097. (And it sounds like we might be able to add lint checks for it.) |
Linking from https://crbug.com/331393770, will assign myself if I manage to get to this. |
Looked into this a bit. While some of the rules in https://github.com/eslint-functional/eslint-plugin-functional might be helpful, there aren't any that would actually enforce readonly the way we need. The most useful rules in there are around preferring readonly types, but we only would want to apply that to globals and I don't think there's a way to do this. I think this is infeasible for now unfortunately. |
The current configuration that we have for linting, etc does not always strictly enforce not assigning to
readonly
params. I have a WIP branch where I know I am improperly assigning to areadonly
.I do not get errors about this in my IDE,
npm run fix
or when running the unittests, butnpm run check
and running the CTS via dawn.node it errors on this.There is probably somewhere in the configs that this is being suppressed or not turned on.
I need to take some time to figure out how make sure this properly enabled and fix up any violates that have snuck in.
The text was updated successfully, but these errors were encountered: