retextjs/retext-simplify

`has no effect` triggers a warning with no suitable alternative.

aduh95 opened this issue · 4 comments

Initial checklist

Problem

The following sentence:

If the [`formData`](#formData-true) option is set to false, `metaFields` has no effect.

Produces the following result:

warning   Replace `effect` with `choose`, `pick`

None of the suggested alternative works here.

Solution

Either provide a different alternative, or accept has no effect as a valid expression.

Alternatives

Add 'effect' to the ignore list.

It’s a pretty simple module, there is no awareness of context, so accepting one word in certain combinations is not possible.

Some alternatives:

  • does nothing or does not apply (this matches your context but can’t be added to suggestions)
  • has no result (result could be added to the list of suggestions)
  • `metaFields` does nothing/not apply when `formData` is set to `false` (rewrite sentence)

Maybe we could do something similar to benefit to provide more granular suggestion based on a combination of words:

retext-simplify/patterns.js

Lines 194 to 199 in 60e0193

benefit: {
replace: ['help']
},
'benefit from': {
replace: ['enjoy']
},

I haven't tried it, but maybe something like that would work:

  'has no effect': { replace: ['does nothing', 'does not apply'] },

+1 for adding result to the list of suggestions, do you want me to open a PR?

In any case, thanks for your helpful suggestions – and for this plugin, it's quite helpful for someone like me who is not English native speaker.

oh that’s interesting, I don’t remember that benefit from technique.

Yes, PR would be great! With either or both of the 'has no effect' and result in effect cases?

In any case, thanks for your helpful suggestions – and for this plugin, it's quite helpful for someone like me who is not English native speaker.

Good to hear, thanks! 👍

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.