question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

insertAfter adds empty line before

See original GitHub issue

insertAfter adds new line before inserted ast.

I created second import by jscodeshift so in js it looks like

//Core
import React, { Component, PropTypes } from 'react';

import connect from 'react-redux';

But should be:

import React, { Component, PropTypes } from 'react';
import connect from 'react-redux';

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ghostcommented, Dec 2, 2020

Also for anyone looking for a fix for running codemods: run this script afterwards to remove the empty lines: https://gist.github.com/jackaldridge/68b39a8e1de71384b8caaeb78ee10cda

4reactions
alexlafrosciacommented, Mar 3, 2017

For anyone else that comes across this, the accompanying recast issue can be found here:

https://github.com/benjamn/recast/issues/371

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to add one empty line to the end of the file in Ansible?
It should be insertafter EOF which is default. The following should work. - lineinfile: dest: /mypath/myfile line: ''.
Read more >
insertDocument results 1 one blank line before - Aspose Forums
I do this via insertAfter. But everytime insertDocument is executed then the insertion starts with a blank line.
Read more >
Interop - how to always put a blank line between pasted tables
I am copying and pasting tables before putting some data in them i(f there is any data for that table). My problem is...
Read more >
Linux: Using sed to insert lines before or after a match
The sed utility is a powerful utility for doing text transformations. In this article, I will provide an example of how to insert...
Read more >
jQuery insertAfter() Method - GeeksforGeeks
The insertAfter() method is an inbuilt method in jQuery that is used to insert some HTML content after a specified element.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found