Skip to content
Snippets Groups Projects
Commit 4bdd3393 authored by Yuriy Maksymets's avatar Yuriy Maksymets
Browse files

Prettier config

parent 21a2b346
No related branches found
No related tags found
No related merge requests found
module.exports = { module.exports = {
semi: false semi: false,
printWidth: 80,
tabWidth: 2,
useTabs: false,
singleQuote: false,
trailingComma: "all",
arrowParens: "always",
endOfLine: "lf",
} }
...@@ -37,6 +37,18 @@ Open the developer console to find out your client's ID. To connect to another p ...@@ -37,6 +37,18 @@ Open the developer console to find out your client's ID. To connect to another p
>> window.connectToPeer("peer-id") >> window.connectToPeer("peer-id")
``` ```
## Development
### Precommit Checks
The project is supplied with a `.pre-commit-config.yml`. This file defines the checks that [pre-commit](https://pre-commit.com/) must execute on every `git commit`.
To use pre-commit (RECOMMENDED):
1. Install it, following the instructions available at the link provided;
2. Hook it to the project, by running `pre-commit install` from the project's root directory.
Whenever a pre-commit check fails, it fixes the code in place for you and aborts the commit.
You therefore have to `git add .` and reissue the `git commit` command.
## License ## License
MIT MIT
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
var mouse = { var mouse = {
x: e.offsetX, x: e.offsetX,
y: e.offsetY y: e.offsetY,
} }
path = document.createElementNS("http://www.w3.org/2000/svg", "path") path = document.createElementNS("http://www.w3.org/2000/svg", "path")
...@@ -52,13 +52,13 @@ ...@@ -52,13 +52,13 @@
whiteboard.onmousemove = function(e) { whiteboard.onmousemove = function(e) {
var mouse = { var mouse = {
x: e.offsetX, x: e.offsetX,
y: e.offsetY y: e.offsetY,
} }
if (painting) { if (painting) {
path.setAttribute( path.setAttribute(
"d", "d",
path.getAttribute("d") + " L" + mouse.x + " " + mouse.y path.getAttribute("d") + " L" + mouse.x + " " + mouse.y,
) )
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment