]> git.wincent.com - wincent.git/commitdiff
style: format TS files
authorGreg Hurrell <greg@hurrell.net>
Thu, 19 Mar 2020 23:58:11 +0000 (00:58 +0100)
committerGreg Hurrell <greg@hurrell.net>
Thu, 19 Mar 2020 23:58:11 +0000 (00:58 +0100)
.prettierignore
package.json
src/harness.ts
src/main.ts

index 9f6a5133ad5fdb84f89a5ecaa6f6607b3d5dbb28..dd26b093390f125d9acfd6c2bd5b60697387c63b 100644 (file)
@@ -1,2 +1,3 @@
+/lib
 /roles/dotfiles/files/.vim
 /vendor
index 8c90c44ce55c567ee8c156134900c9ae6426ca37..509ce0d3211df08967a1bb80dc85050a24b8f7e3 100644 (file)
@@ -8,8 +8,8 @@
   "author": "Greg Hurrell <greg@hurrell.net>",
   "license": "Public Domain",
   "scripts": {
-    "format:check": "npx prettier --check \"**/*.js\" \"*.json\" \"*.md\" roles/dotfiles/files/.zsh/liferay/bin/portool",
-    "format": "npx prettier --write \"**/*.js\" \"*.json\" \"*.md\" roles/dotfiles/files/.zsh/liferay/bin/portool"
+    "format:check": "npx prettier --check \"**/*.{js,ts}\" \"*.json\" \"*.md\" roles/dotfiles/files/.zsh/liferay/bin/portool",
+    "format": "npx prettier --write \"**/*.{js,ts}\" \"*.json\" \"*.md\" roles/dotfiles/files/.zsh/liferay/bin/portool"
   },
   "dependencies": {
     "typescript": "3.8.3"
index fc5a9b281435146539d4bd81f47eb7c88926cd39..cae4f6982c93bb5a59bbb3075f2a2723edb26abf 100644 (file)
@@ -5,11 +5,7 @@ const TESTS: Array<[string, () => void]> = [];
 export function expect(value: unknown) {
   return {
     toBe(expected: unknown) {
-      assert.equal(
-        value,
-        expected,
-        `Expected ${value} to be ${expected}`
-      );
+      assert.equal(value, expected, `Expected ${value} to be ${expected}`);
     },
   };
 }
index a556a678fbfee960788baa97b60ead3b3bed5e04..9a3856ceb35198009190c7ba9f725edafdb5c0bd 100644 (file)
@@ -10,9 +10,8 @@ async function main() {
   await test();
 }
 
-main()
-  .catch(error => {
-    log(`Error: ${error}`);
+main().catch(error => {
+  log(`Error: ${error}`);
 
-    process.exit(1);
-  });
+  process.exit(1);
+});