Uploaded image for project: 'Aptana Studio'
  1. Aptana Studio
  2. APSTUD-4376

Add spaces only before control flow parentheses

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Aptana Studio 3.0.8
    • Fix Version/s: None
    • Component/s: Formatting

      Description

      In Javascript, many people prefer writing if, while, for, switch (possibly others) with a space between the keyword and the parameters, but function calls without a space. e.g.

      if (condition) {
          myFunc(foo);
      }
      

      Furthermore, JSLint wants people to use a space for anonymous functions so you can more easily see that it's an anonymous function, e.g.

      function () {
      }
      function myFunc() {
      }
      

      Can these rules be implemented in the Javascript formatter?

        Attachments

          Activity

            People

            • Assignee:
              pinnamuri Praveen Innamuri (Inactive)
              Reporter:
              wmertens Wout Mertens
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Git Source Code