You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
a workaround is to wrap the anonymous function with open and close parens
(function(){console.log("Hello");})
I believe this error might be "recent" it occurred when I updated eslint from 9.0.0 to 9.4.0 and eslint-plugin-markdown from 4.0.1 to 5.0.0 but am not certain about that.
thanks for the helpful plugin :)
The text was updated successfully, but these errors were encountered:
Hi @iambumblehead! This behavior is intended. Note that function declarations, unlike function expressions, are required to have a name in JavaScript in most cases. So this code contains a syntax error, and it will be rejected by a browser or Node.js if you try to run it without modifications:
An anonymous FunctionDeclaration can only occur as part of an export default declaration, and its function code is therefore always strict mode code.
ESLint v9.0.0 with the default parser reports the same error you are seeing with ESLint v9.4.0. But if you were using a different parser previously, it's entirely possible that the syntax error went unnoticed.
to reproduce the error, apply the below patch and run the tests,
the error looks like this,
a workaround is to wrap the anonymous function with open and close parens
I believe this error might be "recent" it occurred when I updated eslint from 9.0.0 to 9.4.0 and eslint-plugin-markdown from 4.0.1 to 5.0.0 but am not certain about that.
thanks for the helpful plugin :)
The text was updated successfully, but these errors were encountered: