This is an archive of the discontinued LLVM Phabricator instance.

clang-format: [JS] ASI after imports
ClosedPublic

Authored by mprobst on Jan 9 2017, 1:05 AM.

Details

Summary

Automatic semicolon insertion should break import and export statements:

Before, this would format on one line:

// Note: no semi after 'x' below!
import {x} from 'x'
export function foo() {}

Into:

import {x} from 'x' export function foo() {}

With this change, the statements get separated.

This also improves automatic semicolon insertion to consider closing
braces preceding declarations and statements.

Diff Detail

Repository
rL LLVM

Event Timeline

mprobst updated this revision to Diff 83593.Jan 9 2017, 1:05 AM
mprobst retitled this revision from to clang-format: [JS] ASI after imports.
mprobst updated this object.
mprobst added a reviewer: klimek.
mprobst added a subscriber: cfe-commits.
klimek accepted this revision.Jan 9 2017, 1:06 AM
klimek edited edge metadata.

LG

This revision is now accepted and ready to land.Jan 9 2017, 1:06 AM
This revision was automatically updated to reflect the committed changes.