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.

Proposal: Treat goog.scope as IIFE in indent rule

See original GitHub issue

I’d like to modify the indent rule to treat code within a goog.scope function expression similarly to an IIFE. The main reason is to correctly lint code that follows Google’s style guide.

I’m willing to implement this change.

For example, the following has a valid indent according to the google style guide:

goog.scope(function() {
var Button = goog.ui.Button;
var dom = goog.dom;

SomeType.prototype.findButton = function() {
  var myText = "hi";
};
});  // goog.scope

Previous issues about this topic:

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
platinumazurecommented, Sep 19, 2016

Sorry for taking so long to find this. This issue comment on issue #6690 covers a proposal we are entertaining which would fix this issue. So I’d like to close as a duplicate if the team doesn’t object. Thanks!

0reactions
vitorbalcommented, Sep 19, 2016

Sounds good to me!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Scope & the LEGB Rule: Resolving Names in Your Code
In this step-by-step tutorial, you'll learn what scopes are, how they work, and how to use them effectively to avoid name collisions in...
Read more >
Pre-authorisation guidance | European Medicines Agency
This guidance should be read in conjunction with the rules governing medicinal products in the European Union, volume 2, notice to applicants and ......
Read more >
Quality of Life for Prisoners Segregated for Their Own ...
This paper reviews the Chief Inspector of Prisons' reports on the conditions under which segregated inmates live in British prisons. Abstract. Rule 43...
Read more >
C++ Core Guidelines - GitHub Pages
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++.
Read more >
All About Work Breakdown Structures (WBS) - Smartsheet
2.2), scope definition (3.2.2.3), and work breakdown structure development (3.2.2.4). Many organizations skip the step of creating a WBS plan, ...
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