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

IIFE with leading semicolon wants to be intended when directly after imports #1227

Closed
kjg opened this issue Nov 12, 2018 · 4 comments

Comments

@kjg
Copy link

commented Nov 12, 2018

What version of standard? 11.0.1

What operating system, Node.js, and npm version? MacOS 10.14.2, Node 8.9.3, NPM 6.4.1

What did you expect to happen?

This code should not cause any errors

import $ from 'jquery'

// Bootstrap
;(() => {
  window.$ = $
})()

What actually happened?
I get the error Expected indentation of 2 spaces but found 0.

Interestingly if I move this IIFE to below other code, I don't get the error only when it's the first bit of code after the import statement.

@kjg

This comment has been minimized.

Copy link
Author

commented Nov 13, 2018

Reported eslint/eslint#11082

@stale

This comment has been minimized.

Copy link

commented Feb 11, 2019

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 Feb 11, 2019

@kjg

This comment has been minimized.

Copy link
Author

commented Feb 11, 2019

@kjg kjg closed this Feb 11, 2019

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2019

@standard standard unlocked this conversation Aug 12, 2019

@feross

This comment has been minimized.

Copy link
Member

commented Aug 12, 2019

Thanks for reporting this issue and getting it fixed in ESLint @kjg. Much appreciated!

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