forked from mysticatea/eslint-plugin-node
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make the exports style fixable under some circumstances * Handle generators * Preserve comments from inside the object literal * Consistent semicolons in fixed output * Test that we only replace top-level module.exports = {...} * Also replace module.exports.foo references * Split fixing code into two functions to avoid exceeding the complexity budget * Also fix shorthand property occurrences * Make helper functions * Return undefined instead of [] Both work and satisfy the linter * Simplify a bit Seems like in-between comments are only attached to one of the nodes * Don't use SourceCode#getComments (deprecated) mysticatea#208 (comment) * Be more defensive and try to match the patterns that we do want to fix #17 (comment) * Return null instead of undefined #17 (comment) #17 (comment) #17 (comment) * Add a few more test cases #17 (comment)
- Loading branch information
1 parent
e20cc18
commit 7e2bf41
Showing
2 changed files
with
270 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters