diff --git a/back/.prettierignore b/back/.prettierignore new file mode 100644 index 00000000..1f453464 --- /dev/null +++ b/back/.prettierignore @@ -0,0 +1 @@ +src/Messages/generated diff --git a/back/.prettierrc.json b/back/.prettierrc.json new file mode 100644 index 00000000..5fcd8a70 --- /dev/null +++ b/back/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "tabWidth": 4 +} diff --git a/back/package.json b/back/package.json index a6ff7319..5df9e48e 100644 --- a/back/package.json +++ b/back/package.json @@ -11,7 +11,9 @@ "profile": "tsc && node --prof ./dist/server.js", "test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", "lint": "node_modules/.bin/eslint src/ . --ext .ts", - "fix": "node_modules/.bin/eslint --fix src/ . --ext .ts" + "fix": "node_modules/.bin/eslint --fix src/ . --ext .ts", + "pretty": "yarn prettier --write src/", + "pretty-check": "yarn prettier --check src/" }, "repository": { "type": "git", @@ -66,6 +68,7 @@ "@typescript-eslint/parser": "^2.26.0", "eslint": "^6.8.0", "jasmine": "^3.5.0", + "prettier": "^2.3.1", "ts-node-dev": "^1.0.0-pre.44", "typescript": "^3.8.3" } diff --git a/back/yarn.lock b/back/yarn.lock index 3ac4b0a8..813e0f8e 100644 --- a/back/yarn.lock +++ b/back/yarn.lock @@ -2039,6 +2039,11 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= +prettier@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" + integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" diff --git a/front/.prettierignore b/front/.prettierignore index d7d4e5c0..1f453464 100644 --- a/front/.prettierignore +++ b/front/.prettierignore @@ -1 +1 @@ -src/Messages +src/Messages/generated diff --git a/pusher/.prettierignore b/pusher/.prettierignore new file mode 100644 index 00000000..1f453464 --- /dev/null +++ b/pusher/.prettierignore @@ -0,0 +1 @@ +src/Messages/generated diff --git a/pusher/.prettierrc.json b/pusher/.prettierrc.json new file mode 100644 index 00000000..5fcd8a70 --- /dev/null +++ b/pusher/.prettierrc.json @@ -0,0 +1,3 @@ +{ + "tabWidth": 4 +} diff --git a/pusher/package.json b/pusher/package.json index 63188032..3417f2c1 100644 --- a/pusher/package.json +++ b/pusher/package.json @@ -11,7 +11,9 @@ "profile": "tsc && node --prof ./dist/server.js", "test": "ts-node node_modules/jasmine/bin/jasmine --config=jasmine.json", "lint": "DEBUG= node_modules/.bin/eslint src/ . --ext .ts", - "fix": "DEBUG= node_modules/.bin/eslint --fix src/ . --ext .ts" + "fix": "DEBUG= node_modules/.bin/eslint --fix src/ . --ext .ts", + "pretty": "yarn prettier --write src/", + "pretty-check": "yarn prettier --check src/" }, "repository": { "type": "git", @@ -65,6 +67,7 @@ "@typescript-eslint/parser": "^2.26.0", "eslint": "^6.8.0", "jasmine": "^3.5.0", + "prettier": "^2.3.1", "ts-node-dev": "^1.0.0-pre.44", "typescript": "^3.8.3" } diff --git a/pusher/yarn.lock b/pusher/yarn.lock index 88a20475..6657c0a8 100644 --- a/pusher/yarn.lock +++ b/pusher/yarn.lock @@ -2039,6 +2039,11 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= +prettier@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.1.tgz#76903c3f8c4449bc9ac597acefa24dc5ad4cbea6" + integrity sha512-p+vNbgpLjif/+D+DwAZAbndtRrR0md0MwfmOVN9N+2RgyACMT+7tfaRnT+WDPkqnuVwleyuBIG2XBxKDme3hPA== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"