Richie Bendall

Results 140 comments of Richie Bendall

The fixer will require some tweaks to get it working nicer with both multiline and single-line expressions. Also some more tests may help.

The files for `no-array-for-each` and `no-useless-spread` are both triggering the rule so that part seems to work

Yes, you are correct. The way [MDN describes it](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/switch#block-scope_variables_within_switch_statements) makes it sound like more of an inconvenience but this will probably make automatic fixing improbable.

Stylistically speaking, we'd only want for all blocks to either have braces or blocks.

The rule is built to allow for either always braces (default) or never braces to allow for differing opinions. The whole context thing adds extra steps since variables defined outside...

Does this also fix https://github.com/xojs/xo/issues/555?

There's no way to provide the absolute path of a plugin so I'm not quite sure how to fix it. The issue appears to have been present before xo 0.40.0...

> Is this happening because I'm installing xo globally? It is very likely the case. Try a local installation and see if it works.

Just discovered the `resolvePluginsRelativeTo` option which should be able to fix this. PR incoming soon.

As it turns out, fixing this problem causes another one to occur which has led me to conclude that `resolvePluginsRelativeTo` is not the solution.