Skip to content

Commit 2eb11a5

Browse files
Updated readme.md
1 parent a0044f1 commit 2eb11a5

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Road map
22

33
- [x] Install npm modules
4-
- [x] Command on JavaScript context menu
4+
- [x] Command on JavaScript context menu\
5+
- [x] Updated readme.md
56
- [ ] Document code in comments
67

78
Features that have a checkmark are complete and available for

‎README.md‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,36 @@ See the [change log](CHANGELOG.md) for changes and road map.
1818
- Uses [prettier](https://github.com/jlongster/prettier) node module
1919

2020
### Prettify
21-
coming soon...
21+
This extension calls the [prettier](https://github.com/jlongster/prettier) node module behind the scenes to format any JavaScript document to its standards.
22+
23+
For example, take the following code:
24+
25+
```js
26+
foo(arg1, arg2, arg3, arg4);
27+
```
28+
29+
That looks like the right way to format it. However, we've all run
30+
into this situation:
31+
32+
```js
33+
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
34+
```
35+
36+
Suddenly our previous format for calling function breaks down because
37+
this is too long. What you would probably do is this instead:
38+
39+
```js
40+
foo(
41+
reallyLongArg(),
42+
omgSoManyParameters(),
43+
IShouldRefactorThis(),
44+
isThereSeriouslyAnotherOne()
45+
);
46+
```
47+
48+
Invoke the command from the context menu in the JavaScript editor.
49+
50+
![Context Menu](art/context-menu.png)
2251

2352
## Contribute
2453
Check out the [contribution guidelines](.github/CONTRIBUTING.md)

‎art/context-menu.png‎

6.09 KB
Loading

0 commit comments

Comments
 (0)