Disable the unicorn/prefer-string-slice
rule
#234
Replies: 3 comments
-
We should keep the The rule is auto-fixable so it's low effort to fix. Also, I don't want to mess with recommended configurations (disable rules that are recommended) when it's not necessary, because it may increase maintenance work. Please see the documentation for the rule |
Beta Was this translation helpful? Give feedback.
-
// does not support negative indices, so you have to use `foo.length - 5`
foo.substring(indexStart, indexEnd);
// does support negative indices to count backwards, so you can just pass `-1` or `-5`
foo.slice(beginIndex, endIndex);
If you really need the length feature of |
Beta Was this translation helpful? Give feedback.
-
ok then... |
Beta Was this translation helpful? Give feedback.
-
There is a proposal to disable the
unicorn/prefer-string-slice
rule.Beta Was this translation helpful? Give feedback.
All reactions