فهرست منبع

fix formatting settings

Richard Köhl 2 سال پیش
والد
کامیت
fc20f1a68f
4فایلهای تغییر یافته به همراه21 افزوده شده و 17 حذف شده
  1. 0 1
      .gitignore
  2. 9 0
      .vscode/settings.json
  3. 5 9
      deno.jsonc
  4. 7 7
      test/test.ts

+ 0 - 1
.gitignore

@@ -1,2 +1 @@
-.vscode
 .env

+ 9 - 0
.vscode/settings.json

@@ -0,0 +1,9 @@
+{
+  "deno.enable": true,
+  "editor.defaultFormatter": "denoland.vscode-deno",
+  "[typescript]": {
+    "editor.defaultFormatter": "denoland.vscode-deno"
+  },
+  "typescript.preferences.quoteStyle": "single",
+  "javascript.preferences.quoteStyle": "single"
+}

+ 5 - 9
deno.jsonc

@@ -20,14 +20,10 @@
     }
   },
   "fmt": {
-    "files": {
-      "include": ["src/"]
-    },
-    "options": {
-      "useTabs": false,
-      "lineWidth": 80,
-      "indentWidth": 2,
-      "singleQuote": true
-    }
+    "include": ["src/", "test/"],
+    "useTabs": false,
+    "lineWidth": 80,
+    "indentWidth": 2,
+    "singleQuote": true
   }
 }

+ 7 - 7
test/test.ts

@@ -1,14 +1,14 @@
-import { assert, assertEquals } from "testing/asserts.ts";
+import { assert, assertEquals } from 'testing/asserts.ts';
 
-Deno.test("are we operational?", async () => {
-  const cmd = new Deno.Command(Deno.execPath(), {args: ["task", "dev"]});
+Deno.test('are we operational?', async () => {
+  const cmd = new Deno.Command(Deno.execPath(), { args: ['task', 'dev'] });
 
   const { success, stdout, stderr } = await cmd.output();
-  const errors = new TextDecoder().decode(stderr).split("\n");
+  const errors = new TextDecoder().decode(stderr).split('\n');
   errors.shift();
   const output = new TextDecoder().decode(stdout).trim();
 
-  assert(success, "success");
-  assertEquals(errors.join("\n"), "", "no error output");
-  assertEquals(output, "hello world!", "correct stdout");
+  assert(success, 'success');
+  assertEquals(errors.join('\n'), '', 'no error output');
+  assertEquals(output, 'hello world!', 'correct stdout');
 });