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
Closed
Labels

Comments

@kjg
Copy link

kjg 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
Copy link
Author

kjg commented Nov 13, 2018

Reported eslint/eslint#11082

@stale
Copy link

stale bot 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
Copy link
Author

kjg commented Feb 11, 2019

Fixed eslint/eslint#11085

@kjg kjg closed this as completed 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
Copy link
Member

feross commented Aug 12, 2019

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

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants