Skip to content

Commit 9bad3af

Browse files
committed
added ts
1 parent a40c355 commit 9bad3af

File tree

14 files changed

+33
-14
lines changed

14 files changed

+33
-14
lines changed

β€Žeslint.config.jsβ€Ž

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,31 @@ import eslint from "@eslint/js";
33
import vitest from "@vitest/eslint-plugin";
44
import tseslint from "typescript-eslint";
55
import prettier from "eslint-plugin-prettier/recommended";
6+
import { defineConfig } from "eslint/config";
67

7-
export default tseslint.config(
8+
export default defineConfig([
89
eslint.configs.recommended,
910
vitest.configs.recommended,
10-
tseslint.configs.recommended,
11+
tseslint.configs.recommendedTypeChecked,
1112
prettier,
12-
{ languageOptions: { globals: globals.browser } },
13-
{ rules: { "prefer-template": "error" } },
14-
);
13+
{
14+
languageOptions: {
15+
globals: globals.browser,
16+
parserOptions: {
17+
projectService: true,
18+
tsconfigRootDir: import.meta.dirname,
19+
},
20+
},
21+
},
22+
{
23+
rules: {
24+
"prefer-template": "error",
25+
"@typescript-eslint/no-unsafe-argument": "off",
26+
"@typescript-eslint/no-unsafe-assignment": "off",
27+
"@typescript-eslint/no-unsafe-call": "off",
28+
"@typescript-eslint/no-unsafe-member-access": "off",
29+
"@typescript-eslint/no-unsafe-return": "off",
30+
"@typescript-eslint/no-implied-eval": "off",
31+
},
32+
},
33+
]);

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"scripts": {
1010
"start": "node src/index.js",
11-
"deno": "deno run --allow-env --allow-net --allow-read src/server/local.js",
11+
"deno": "deno run --allow-env --allow-net --allow-read server/local.js",
1212
"serve": "http-server -p 443 -S -o -c-1 -C static/http-cert.pem -K static/http-key.pem",
1313
"test": "if [ -z \"$CI\" ]; then vitest run --changed $*; else vitest run $*; fi",
1414
"lint": "eslint src"
File renamed without changes.

β€Žsrc/2019/day05.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function execute(ops, ip, user) {
1313
return ip + 4;
1414
case 3:
1515
if (user.input.length === 0) {
16-
throw "waiting for input";
16+
throw new Error("waiting for input");
1717
}
1818
ops[ops[ip + 1]] = user.input.shift();
1919
return ip + 2;

0 commit comments

Comments
Β (0)