Fix more build errors

This commit is contained in:
Darren Clarke 2023-03-15 12:17:43 +00:00
parent 1bdc1e60db
commit 30ce47826f
61 changed files with 1161 additions and 541 deletions

View file

@ -29,6 +29,7 @@ module.exports = {
"no-use-extend-native/no-use-extend-native": "error",
// this one breaks libraries like Ramda and lodash
"unicorn/no-array-callback-reference": "off",
"unicorn/filename-case": "off",
"unicorn/better-regex": [
"error",
{

View file

@ -16,13 +16,8 @@ module.exports = {
},
],
"no-extra-semi": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-nocheck": "allow-with-description",
"ts-expect-error": "allow-with-description",
},
],
},
};

View file

@ -1,7 +1,6 @@
import chalk from "chalk";
import convict from "convict";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const visitLeaf = (path: any, key: any, leaf: any) => {
if (leaf.skipGenerate) {
return;
@ -21,7 +20,6 @@ const visitLeaf = (path: any, key: any, leaf: any) => {
console.log(`\tenv: ${leaf.env}`);
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const visitNode = (path: any, node: any, key = "") => {
if (node._cvtProperties) {
const keys = Object.keys(node._cvtProperties);
@ -36,7 +34,6 @@ const visitNode = (path: any, node: any, key = "") => {
}
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const printConfigOptions = (conf: convict.Config<any>): void => {
const schema = conf.getSchema();
visitNode("", schema);

View file

@ -12,7 +12,6 @@ export const defaultSessionMaxAge = 30 * 24 * 60 * 60 * 1000;
// Sessions updated only if session is greater than this value (0 = always)
export const defaulteSessionUpdateAge = 24 * 60 * 60 * 1000;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const getCompoundId = (providerId: any, providerAccountId: any) =>
createHash("sha256")
.update(`${providerId}:${providerAccountId}`)
@ -27,7 +26,7 @@ export class NextAuthAdapter<TRepositories extends IMetamigoRepositories>
private repos: TRepositories,
private readonly sessionMaxAge = defaultSessionMaxAge,
private readonly sessionUpdateAge = defaulteSessionUpdateAge
) {}
) { }
async createUser(profile: UnsavedUser): Promise<SavedUser> {
// @ts-expect-error Typescript doesn't like lodash's omit()

View file

@ -5,7 +5,8 @@
"outDir": "build/main",
"rootDir": "src",
"baseUrl": "./",
"types": ["jest", "node"]
"types": ["jest", "node"],
"esModuleInterop": true
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules/**"]