fisker Cheung
fisker Cheung
I may have a solution for this, we can find root `.git` directory, and glob `.gitignore` from there.
`ignore` bring the old(v4) behavior back by adding `allowRelativePaths` options, maybe we should consider use that. https://github.com/kaelzhang/node-ignore/commit/052a7229e39ab113cbb6b796748597632aca0f2d
[The tests](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/test/no-useless-fallback-in-spread.mjs) [The snapshots](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/test/snapshots/no-useless-fallback-in-spread.mjs.md)
Here is [the line](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/d51a197067b1d09e72de0ff6388ff8a09ebd3742/test/utils/snapshot-rule-tester.mjs#L187) I use it, I've linked in the description. Update: I'm sorry that I forgot to mention this is request to assert output for suggestions.
> So you are wanting to make sure that each suggestion, when applied, is outputting the correct result? That's right. > Would that address your use case? I'm afraid it...
Thanks for working on this. I'm afraid it won't work for my case, as I understand, the `outputAssert` used to assert `output` and `messages[index].suggestions[index].output`, but I need assert `message` too....
@lydell Maybe jest@26 don't understand `exports` in package.json?
I've copied the whole `SourceCodeFixer` https://github.com/sindresorhus/eslint-plugin-unicorn/pull/1488/files#diff-342ff0788a2d0ad291c2f5630bef947fcf20017916cfb0e13c4aedf45b0b15b1R1, it works, but I can try your simple version when I back to my laptop.
> Would it be possible to also detect the following example? Yes.
Note that they are not really the same, we need check that initial assigned value don't have sideeffect.