Skip to content

Instantly share code, notes, and snippets.

@matiasiglesias
Forked from jckeen/angular2codestyle.xml
Last active March 10, 2018 03:12
Show Gist options
  • Save matiasiglesias/cd777d8d5a3c3d6b6e914174e9f67f2d to your computer and use it in GitHub Desktop.
Save matiasiglesias/cd777d8d5a3c3d6b6e914174e9f67f2d to your computer and use it in GitHub Desktop.
Angular 2 TypeScript Code Style For WebStorm
<!--
These are code style settings, based off the Style Guide for Angular 2:
https://angular.io/docs/ts/latest/guide/style-guide.html
WebStorm does not currently reformat code based off of tslint.json settings.
This is an attempt to set TypeScript settings for Code Style to follow the Style Guide.
I will update this as I find differences.
To Import: Settings > Editor > Code Style > Import
-->
<code_scheme name="Angular 2">
<TypeScriptCodeStyleSettings>
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="SPACES_WITHIN_OBJECT_LITERAL_BRACES" value="true" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
</TypeScriptCodeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="SPACE_WITHIN_BRACKETS" value="true" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>
@xujiesh0510
Copy link

xujiesh0510 commented Mar 10, 2018

hi.seems not working on constructor (left vscode ,right webstorm)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment