[prefer-readonly-parameter-types] Using prefer-readonly-parameter-types rule with lib.dom #1727
Labels
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
working as intended
Issues that are closed as they are working as intended
I can't figure out how to use
prefer-readonly-parameter-types
rule on interop with DOM (lib.dom typings).Previously i using
@typescript-eslint/eslint-plugin: ^2.20.0
and have code like this:After update to
2.23.0
i got a eslint errorParameter should be a read only typeeslint(@typescript-eslint/prefer-readonly-parameter-types)
This rule require something like
After that i got next error on the same place
Make all properties in T readonly
.It means that i should modify external library's code to fix that error, but it's impossible
I think that lib.dom (HTMLElement, etc) just 1 out of many errors from this rule on project-library interop layer.
This error caused by #1513
So I suggest to switch rule level from
error
towarn
inpackages/eslint-plugin/src/configs/all.json
The text was updated successfully, but these errors were encountered: