Open gabssnake opened 3 years ago
Hi, thanks for your work, love this eslint-plugin :)
I encountered an issue where some code, admittedly very bad, produces invalid output after fixing no-mocha-arrows.
no-mocha-arrows
it("writes code in strange ways", () => // This is a disaster waiting to happen assert(true) );
When running eslint --fix it produces output:
eslint --fix
it("writes code in strange ways", function ()// This is a disaster waiting to happen { return assert(true) });
Here's a failing test case (not sure of the expected code) :
+++ b/test/rules/no-mocha-arrows.js @@ -31,6 +31,11 @@ ruleTester.run('no-mocha-arrows', rules['no-mocha-arrows'], { + { + code: 'it(() => \n//hello\nassert(hello, false))', + errors, + output: 'it(function() {\n//hello\nreturn assert(hello, false); })' + },
Do you have any pointers for a fix? I'll be happy to contribute!
Kind regards,
Hi, thanks for your work, love this eslint-plugin :)
I encountered an issue where some code, admittedly very bad, produces invalid output after fixing
no-mocha-arrows
.When running
eslint --fix
it produces output:Here's a failing test case (not sure of the expected code) :
Do you have any pointers for a fix? I'll be happy to contribute!
Kind regards,