We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input code:
function someFn( // comment a a, // comment b b, ) {}
Fixed code:
const someFn = (a, b) => {};
Preserve whitespace and comments
The text was updated successfully, but these errors were encountered:
It looks like getSourceCode() used to rewrite the function body is now deprecated and instead context.sourceCode should be used. Here is some documentation on how eslint API handles comments: https://eslint.org/docs/latest/extend/custom-rules#accessing-the-source-text
Sorry, something went wrong.
In case you're interested, I ended up rolling my own solution which makes autofixes with more precision: https://github.com/privatenumber/lintroll/tree/develop/src/custom-rules/prefer-arrow-functions
No branches or pull requests
Description
Input code:
Fixed code:
Suggested Solution
Preserve whitespace and comments
Help Needed
The text was updated successfully, but these errors were encountered: