sapegin / textlint-rule-stop-words

Textlint rule to find filler words, buzzwords and clichés
MIT License
20 stars 6 forks source link

words need to be declared as Array #21

Closed ggrossetie closed 3 years ago

ggrossetie commented 3 years ago

Not sure if this is intended or not but it won't work as expected if the words are defined as String. The reason is that we are using the following code:

https://github.com/sapegin/textlint-rule-stop-words/blob/1b0f19fc89c03265abb3e02e42525bdf168387df/index.js#L38

If the rule (ie. the word declared in the words property) is an Array then word will be the word and replacement will be undefined. But if the is a String then word will be the first letter of the word and replacement the second letter of the word.