Skip to content

Commit d354d37

Browse files
committed
Updated tsconfig.md and README.md
1 parent 9ceb76d commit d354d37

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ JavaScript developers can now just open a `.ts` file and start hacking away like
3131
* Project Build Support
3232
* `package.json` Support
3333
* React Support
34-
* Format code
34+
* Format code (configurable to be on save)
3535
* Goto Declaration
3636
* Find References
3737
* Block comment and uncomment

docs/tsconfig.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ i.e. an empty JSON file at the *root* of your project :heart: This will be suffi
2020
* [`compileOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#compileonsave) : Should AtomTS compile on save
2121
* [`buildOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#buildonsave) : Should AtomTS build on save
2222
* [`scripts`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#scripts) : Sometimes its useful to have post build scripts
23-
* [`atom`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#rewriteTsconfig) : Configuration specific to Atom. Currently
24-
only contains `rewriteTsconfig` which prevents Atom from rewriting a project's `tsconfig.json`.
23+
* [`atom`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#atom) : Configuration specific to Atom.
24+
* [`rewriteTsconfig`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#rewriteTsconfig) which prevents Atom from rewriting a project's `tsconfig.json`
25+
* [`formatOnSave`](https://github.com/TypeStrong/atom-typescript/blob/master/docs/tsconfig.md#formatOnSave) which will format the Typescript file on save.
2526

2627
## Examples
2728

@@ -134,5 +135,17 @@ to `false` (this defaults to `true`).
134135
}
135136
```
136137

138+
**formatOnSave**
139+
140+
Setting this to `true` will format the entire file exactly like `ctrl+alt+l` or `cmd+alt+l` does on save. (this defaults to `false`)
141+
142+
```json
143+
{
144+
"atom": {
145+
"formatOnSave": true
146+
}
147+
}
148+
```
149+
137150
## Additional Notes
138151
FWIW [a json schema is also available](http://json.schemastore.org/tsconfig)

0 commit comments

Comments
 (0)