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

Improve indent rule to support more ts syntax #2042

Merged
merged 11 commits into from
Dec 25, 2022
Merged

Improve indent rule to support more ts syntax #2042

merged 11 commits into from
Dec 25, 2022

Conversation

ota-meshi
Copy link
Member

@ota-meshi ota-meshi commented Nov 21, 2022

This PR adds support for more typescript syntax to indent rules.

// Type parameters given to call expression, and new expressions
foo<T>(arg)
// ^^^
new Foo<T>(arg)
//     ^^^

// Instantiation expression
const ErrorMap = Map<string, Error>
//               ^^^^^^^^^^^^^^^^^^

// Satisfies operator
var a = {} satisfies Foo
//         ^^^^^^^^^

// Accessor property
class Foo {
  accessor foo;
//^^^^^^^^^^^^
}

lib/utils/indent-ts.js Outdated Show resolved Hide resolved
Co-authored-by: Flo Edelmann <florian-edelmann@online.de>
@ota-meshi ota-meshi merged commit e42f737 into master Dec 25, 2022
@ota-meshi ota-meshi deleted the indent-ts branch December 25, 2022 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants