Skip to content

Commit

Permalink
chore: working towards strict mode enabled for SIOP
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jan 22, 2024
1 parent 7fba932 commit 54b0081
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 172 deletions.
2 changes: 1 addition & 1 deletion packages/siopv2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build:schemaGenerator": "node --loader=tsimp/loader generator/schemaGenerator.ts",
"clean": "rimraf dist coverage",
"fix.old": "run-s fix:*",
"fix:prettier.old": "prettier \"{src,s__}/**/*.ts\" --write",
"fix:prettier.old": "prettier \"{src,__tests__}/**/*.ts\" --write",
"fix:lint.old": "eslint . --ext .ts --fix",
"test.old": "run-s build test:*",
"test:lint.old": "eslint . --ext .ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/siopv2/src/authorization-request/URI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export class URI implements AuthorizationRequestURI {
throw Error(SIOPErrors.BAD_PARAMS);
}
// We strip the uri scheme before passing it to the decode function
const matches = uri.match(/^([a-zA-Z][a-zA-Z0-9-_]*:\/\/)/g)
const matches = uri.match(/^([a-zA-Z][a-zA-Z0-9-_]*:\/\/)/g);
if (!Array.isArray(matches)) {
throw Error(SIOPErrors.BAD_PARAMS + `: no scheme`);
}
Expand Down
12 changes: 6 additions & 6 deletions packages/siopv2/src/did/DIDResolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ export function getResolverUnion(
uniResolvers.push(methodResolver);
});
return subjectTypes.indexOf(SubjectSyntaxTypesSupportedValues.DID.valueOf()) !== -1
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
? new Resolver(...{ fallbackResolver, ...uniResolvers })
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
: new Resolver(...uniResolvers);
? // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
new Resolver(...{ fallbackResolver, ...uniResolvers })
: // eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
new Resolver(...uniResolvers);
}

export function mergeAllDidMethods(subjectSyntaxTypesSupported: string | string[], resolvers: Map<string, Resolvable>): string[] {
Expand Down
Loading

0 comments on commit 54b0081

Please sign in to comment.