Skip to content

Commit

Permalink
Docs Update. Prettier, Husky Added (#94)
Browse files Browse the repository at this point in the history
* Update socket-io.config.ts

* Update socket-io.config.ts

* Fixed indents

* add .vscode

* added editor config file

* option link updated into docs

* husky added

Co-authored-by: Robin De Schepper <robin.deschepper93@gmail.com>
  • Loading branch information
InSantoshMahto and Helveg authored Apr 26, 2021
1 parent 3e130f9 commit 4ad0d03
Show file tree
Hide file tree
Showing 12 changed files with 5,464 additions and 143 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run format
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"arrowParens": "avoid",
"bracketSpacing": true,
"endOfLine": "lf",
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"tabWidth": 2
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const config: SocketIoConfig = { url: 'http://localhost:8988', options: {} };
export class AppModule {}
```

We need to configure `SocketIoModule` module using the object `config` of type `SocketIoConfig`, this object accepts two optional properties they are the same used here [io(url[, options])](https://github.com/socketio/socket.io-client/blob/master/docs/API.md#iourl-options).
We need to configure `SocketIoModule` module using the object `config` of type `SocketIoConfig`, this object accepts two optional properties they are the same used here [io(url[, options])](https://socket.io/docs/v4/client-initialization/#Options).

Now we pass the configuration to the static method `forRoot` of `SocketIoModule`

Expand Down
Loading

0 comments on commit 4ad0d03

Please sign in to comment.