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.

`value` inserted before imported variables

See original GitHub issue

Input:

import { something } from './index';

Output:

import { value something } from './index';

Expected:

import { something } from './index';

I don’t think this plugin should affect imports at all, not quite sure what’s going on here.

Tested on 0.3.36 with following config:

{
  "jsdocDescriptionWithDot": true,
  "jsdocSingleLineComment": false,
  "jsdocSeparateTagGroups": true,
  "jsdocPreferCodeFences": true,
  "tsdoc": true
}

Works as expected if I roll back to 0.3.31, haven’t tried any of the versions in-between.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
wardellbagbycommented, Jun 2, 2022

Hey, just wanted to pop in and say I ran into this as well and I think I have some more information.

So I was running Prettier as an ESLint plugin as well as running Prettier in WebStorm.

When I ran Prettier via its own CLI or via ESLint, the value wouldn’t be added to the import. However, running Prettier via the IDE would show this issue.

An IDE restart fixed it for me.

This StackOverflow issue says this might also occur in VS Code and also recommends just restarting your IDE.

In short, this might’ve never been related to this plugin at all.

1reaction
Dan503commented, Apr 11, 2022

@beark if updating to prettier v2.6.2 fixes the issue then this issue can probably be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change the value of a variable before importing a ...
If you change how things work, then its possible to test: # game.py import config def live(): if config.MONEY < 1000: print("Money:", ...
Read more >
Variables (Transact-SQL) - SQL Server - Microsoft Learn
The script uses a variable to do three things: Control how many rows are inserted by controlling how many times the loop is...
Read more >
Inserting variables to database table using Python
In this article, we will see how one can insert the user data using variables. Here, we are using the sqlite module to...
Read more >
Export and Import - The Modern JavaScript Tutorial
We can label any declaration as exported by placing export before it, be it a variable, function or a class. For instance, here...
Read more >
Reuse Variant Parameter Values from Handwritten Code ...
This example shows how to use Simulink.Parameter variables to generate a code that imports variant parameter values from your existing code.
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