You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✖ Error
Error while loading rule '@textlint-rule/preset-google/capitalization': Cannot assign to read only property 'report' of object '#<RuleContext>'
✖ Stack trace
TypeError: Error while loading rule '@textlint-rule/preset-google/capitalization': Cannot assign to read only property 'report' of object '#<RuleContext>'
at Function.assign (<anonymous>)
Related Note: I want to get file list that are linted from RuleContext.
A rule lint the reference of the document.
Currently, a rule does not get the reference of the document.
The file list will resolve this issue.
We have changed
context
to frozen object in textlint 11This change make following hack error.
Issue: textlint-rule/textlint-rule-preset-google#35
I think that it is corner case, but it is reasonable.
Purpose
A rule can re-use existing rule, but modify error message.
This is related with "Localize messages support #252"
Custom message support will resolve this issue.
Or, Should we provide overlay/proxy for context object?
Workaround
javascript - Creating new objects from frozen parent objects - Stack Overflow
Use
Obejct.defineProperty
for overwritereport
function.Related
The text was updated successfully, but these errors were encountered: