Skip to content

Commit d76dc13

Browse files
fix: update deps (#1049)
* fix: update deps * fix: update deps * feat: remove axios * feat: more updates * style: format * chore: run tests on src
1 parent 3d5633e commit d76dc13

File tree

10 files changed

+4173
-1827
lines changed

10 files changed

+4173
-1827
lines changed

.eslintrc.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

babel.config.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"presets": [
3+
["@babel/preset-env", { "targets": { "node": "current" } }],
4+
"@babel/preset-typescript"
5+
]
6+
}

bin/trm-api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function errorHandler(error) {
1616
console.log(error.request);
1717
} else {
1818
// Something happened in setting up the request that triggered an Error
19-
console.log('Error', error.message);
19+
console.log("Error", error.message);
2020
}
2121
}
2222

eslint.config.mjs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import { defineConfig } from "eslint/config";
2+
import typescriptEslint from "@typescript-eslint/eslint-plugin";
3+
import globals from "globals";
4+
import tsParser from "@typescript-eslint/parser";
5+
import path from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
import js from "@eslint/js";
8+
import { FlatCompat } from "@eslint/eslintrc";
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default defineConfig([
19+
{
20+
extends: compat.extends(
21+
"eslint:recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"prettier",
24+
),
25+
26+
plugins: {
27+
"@typescript-eslint": typescriptEslint,
28+
},
29+
30+
languageOptions: {
31+
globals: {
32+
...globals.browser,
33+
...globals.node,
34+
},
35+
36+
parser: tsParser,
37+
ecmaVersion: 12,
38+
sourceType: "module",
39+
},
40+
41+
rules: {},
42+
},
43+
]);

jest.config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/** @type {import('ts-jest').JestConfigWithTsJest} */
1+
/** @type {import('jest').Config} */
22
module.exports = {
3-
preset: 'ts-jest',
4-
testEnvironment: 'node',
5-
};
3+
testEnvironment: "node",
4+
testMatch: ["<rootDir>/src/**/*.test.ts"],
5+
};

0 commit comments

Comments
 (0)