Replies: 3 comments
-
The “from_configuration” function is the right one. However it’s going to contain custom logic that you’ll have to understand to interpret the possible options. The best thing is to just create an issue with the rule that is missing documentation for somebody to update it. If you understand rust and can contribute, then great you can do it yourself. Otherwise, it’ll wait for somebody to pick up. |
Beta Was this translation helpful? Give feedback.
-
I’m not super confident on my interpretation, but if you put anything other than “record” then I think you get the index signature behavior. |
Beta Was this translation helpful? Give feedback.
-
You can look at the tests to be sure: Tells that the configurations is:
A configuration like:
Will be resolved to:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I was looking at consistent-indexed-object-style where there are two options we can pass, but they are undocumented.
How can I find out the exact spelling of the options I can pass to the rule?
I looked at the rule source, which led me here
["error", "record"]
if you wantRecord
but what if you want the other way?"index-signature"
or"index signature"
I can test both to see what works, but in general, if a rule has no documented config, how to best read the code to know?
Beta Was this translation helpful? Give feedback.
All reactions