Skip to content

Commit 87e7e43

Browse files
committed
apply prettier and fix most lint errors
1 parent 112783a commit 87e7e43

File tree

10 files changed

+843
-730
lines changed

10 files changed

+843
-730
lines changed

src/authn/NoAuthnLogic.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
import {AuthnLogic} from "./index";
1+
import { AuthnLogic } from "./index";
22

33
/**
44
* Fallback, if no auth client has been provided to solid-logic
55
*/
66
export class NoAuthnLogic implements AuthnLogic {
7+
constructor() {
8+
console.warn(
9+
"no auth client passed to solid-logic, logic that relies on auth is not available"
10+
);
11+
}
712

8-
constructor() {
9-
console.warn('no auth client passed to solid-logic, logic that relies on auth is not available')
10-
}
11-
12-
currentUser() {
13-
return null;
14-
}
15-
}
13+
currentUser(): null {
14+
return null;
15+
}
16+
}
Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
import {sym} from "rdflib";
2-
import {AuthnLogic, Session} from "./index";
1+
import { NamedNode, sym } from "rdflib";
2+
import { SolidAuthClient } from "..";
3+
import { AuthnLogic, Session } from "./index";
34

45
/**
56
* Implements AuthnLogic relying on solid-auth-client
67
*/
78
export class SolidAuthClientAuthnLogic implements AuthnLogic {
8-
private session?: Session;
9+
private session?: Session;
910

10-
constructor(solidAuthClient) {
11-
solidAuthClient.trackSession(session => {
12-
this.session = session
13-
})
14-
}
11+
constructor(solidAuthClient: SolidAuthClient) {
12+
solidAuthClient.trackSession((session) => {
13+
this.session = session;
14+
});
15+
}
1516

16-
currentUser() {
17-
return this.session?.webId ? sym(this.session?.webId) : null
18-
}
19-
}
17+
currentUser(): NamedNode | null {
18+
return this.session?.webId ? sym(this.session?.webId) : null;
19+
}
20+
}

src/authn/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {NamedNode} from "rdflib";
1+
import { NamedNode } from "rdflib";
22

33
export interface Session {
4-
webId: string
4+
webId: string;
55
}
66

77
export interface AuthnLogic {
8-
currentUser: () => NamedNode | null
9-
}
8+
currentUser: () => NamedNode | null;
9+
}

0 commit comments

Comments
 (0)