Skip to content

Commit 50ba9fe

Browse files
dfdeagle47fisker
andauthored
Fix prefer-string-slice typo in docs (#572)
Co-authored-by: fisker Cheung <[email protected]>
1 parent ff41cb2 commit 50ba9fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/rules/prefer-string-slice.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[`String#substr()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) and [`String#substring()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) are the two lesser known legacy ways to slice a string. It's better to use [`String#slice()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) as it's a more popular option with clearer behavior that has a consistent [`Array` counterpart](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice).
44

5-
This rule is fixible when no arguments are passed to the method.
5+
This rule is partly fixable.
66

77

88
## Fail

0 commit comments

Comments
 (0)