Skip to content
New issue

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

indentation issue in template literals after upgrading to 11.0.0-beta.0 #1056

Closed
egorovli opened this issue Feb 2, 2018 · 14 comments

Comments

@egorovli
Copy link

commented Feb 2, 2018

Hi.

After upgrading to 11.0.0-beta.0 started to experience weird indentation errors in CSS-in-JS (template literals) syntax. See screenshots attached.

screen shot 2018-02-02 at 11 35 56

screen shot 2018-02-02 at 11 37 52

screen shot 2018-02-02 at 11 38 22

If I set indentation how it wants me to, it gets really weird:

screen shot 2018-02-02 at 11 41 00

Have to say that I had to upgrade to 11.0.0-beta.0 because of this issue with babel-eslint:

screen shot 2018-02-02 at 11 45 01

@finnp

This comment has been minimized.

Copy link

commented Mar 24, 2018

Standard 11 seems to have problems with tagged template strings and indentation. Not sure what changed with eslint. I'll stay with 10 for now.

@ArmorDarks

This comment has been minimized.

Copy link

commented Mar 24, 2018

Same issue here.

Here it requires 2 spaces for two lines (note that it's for two lines, not for 3):

sublime_text_2018-03-24_22-35-47

And here even weirder 4 spaces instead of 12:

sublime_text_2018-03-24_22-38-05

ArmorDarks added a commit to LotusTM/Kotsu that referenced this issue Mar 24, 2018

@lidel

This comment has been minimized.

Copy link

commented Apr 12, 2018

I see similar indentation problems with string interpolation and standard v11.0.1 run against this codebase.

standard --fix produces this mess:

index 3ebd809..a593fe2 100644
--- a/add-on/src/popup/page-action/header.js
+++ b/add-on/src/popup/page-action/header.js
@@ -10,12 +10,12 @@ module.exports = function header ({ isIpfsContext, pageActionTitle }) {
     <div class="fade-in ph2 br2 br--top bg-light-gray bb b--black-20">
       <h2 class="ma0 pt1 pb2 pl2 tl">
         ${logo({
-          size: 20,
-          path: '../../../icons',
-          ipfsNodeType: 'external',
-          isIpfsOnline: true,
-          heartbeat: false
-        })} <span class="pl1 f6 fw4 v-mid">${pageActionTitle || '…'}</span>
+    size: 20,
+    path: '../../../icons',
+    ipfsNodeType: 'external',
+    isIpfsOnline: true,
+    heartbeat: false
+  })} <span class="pl1 f6 fw4 v-mid">${pageActionTitle || '…'}</span>
       </h2>
     </div>
   `

Note how line with ${logo({ is left untouched.

@feross

This comment has been minimized.

Copy link
Member

commented May 10, 2018

Wow, this is not good. Will look into fixing this for standard 12

@feross feross added this to the standard v12 milestone May 10, 2018

@NathanielHill

This comment has been minimized.

Copy link

commented Jun 3, 2018

Same problem. In fact, standard --fix is not even idempotent on some of my files using template literals. Saving with auto-linting is interesting to the say the least.

@stale

This comment has been minimized.

Copy link

commented Sep 1, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Sep 1, 2018

@Janpot

This comment has been minimized.

Copy link

commented Sep 1, 2018

This is kind of blocking me to move past v11. I'm not quite sure how this can be fixed. But maybe this issue should stay open?

@stale

This comment has been minimized.

Copy link

commented Nov 30, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Nov 30, 2018

@ArmorDarks

This comment has been minimized.

Copy link

commented Dec 3, 2018

Yeap, definitely stale...

@stale stale bot removed the stale label Dec 3, 2018

@LinusU LinusU added the stale label Dec 4, 2018

@LinusU LinusU closed this Dec 4, 2018

@ArmorDarks

This comment has been minimized.

Copy link

commented Dec 4, 2018

I wonder why was it closed? It is a critical bug. Or has it been fixed?

@LinusU

This comment has been minimized.

Copy link
Member

commented Dec 4, 2018

I interpreted your comment to mean that it was fixed, I'd be happy to reopen if it's still a problem in Standard 12...

@ArmorDarks

This comment has been minimized.

Copy link

commented Dec 4, 2018

As far as I know, it wasn't fixed

@lock lock bot locked as resolved and limited conversation to collaborators Mar 4, 2019

@feross

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Sorry for the delay on this issue! Just tested on the latest version. This appears to be fixed. Lmk if that's not the case.

@standard standard unlocked this conversation Aug 12, 2019

@feross

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Actually, I just tested with another code sample from this issue (#1056) and it seems it's still an issue. Let's move discussion to that issue.

@standard standard locked and limited conversation to collaborators Aug 12, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
8 participants
You can’t perform that action at this time.