Skip to content

Commit

Permalink
lint: remove inferrable types
Browse files Browse the repository at this point in the history
As the reflect-metadata library is no longer used, we no longer need to define inferrable types.

Refs #422, 58efacb
  • Loading branch information
thewilkybarkid committed Nov 29, 2021
1 parent 2baf875 commit d729a7d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 19 deletions.
8 changes: 0 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,6 @@
"node/no-unpublished-import": "off"
}
},
{
"files": [
"src/backend/models/entities/**"
],
"rules": {
"@typescript-eslint/no-inferrable-types": "off"
}
},
{
"files": [
"integration/**"
Expand Down
4 changes: 2 additions & 2 deletions src/backend/models/entities/Comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { Persona } from './Persona';

export class Comment extends BaseEntity {
contents!: string;
isPublished: boolean = false;
isFlagged: boolean = false;
isPublished = false;
isFlagged = false;
author!: Persona;
parent!: FullReview;

Expand Down
2 changes: 1 addition & 1 deletion src/backend/models/entities/Event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class Event extends BaseEntity {
title!: string;
start!: Date;
end?: Date;
isPrivate: boolean = false;
isPrivate = false;
description?: string;
url?: string;
community?: Community;
Expand Down
4 changes: 2 additions & 2 deletions src/backend/models/entities/FullReview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { Preprint } from './Preprint';
import { Statement } from './Statement';

export class FullReview extends BaseEntity {
isPublished: boolean = false;
isFlagged: boolean = false;
isPublished = false;
isFlagged = false;
doi?: string;
drafts: Collection<FullReviewDraft> = new Collection<FullReviewDraft>(this);
mentorInvites: Collection<Persona> = new Collection<Persona>(this);
Expand Down
4 changes: 2 additions & 2 deletions src/backend/models/entities/Persona.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export class Persona extends BaseEntity {
name!: string;
identity?: User;
isAnonymous!: boolean;
isLocked: boolean = false;
isFlagged: boolean = false;
isLocked = false;
isFlagged = false;
bio?: string;
avatar?: Buffer;
avatar_encoding?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/backend/models/entities/RapidReview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ enum Checkboxes {
export class RapidReview extends BaseEntity {
author!: Persona;
preprint!: Preprint;
isPublished: boolean = false;
isFlagged: boolean = false;
isPublished = false;
isFlagged = false;
ynNovel = Checkboxes.na;
ynFuture = Checkboxes.na;
ynReproducibility = Checkboxes.na;
Expand Down
2 changes: 1 addition & 1 deletion src/backend/models/entities/Request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Preprint } from './Preprint';
export class Request extends BaseEntity {
author!: Persona;
preprint!: Preprint;
isPreprintAuthor: boolean = false;
isPreprintAuthor = false;

constructor(author: Persona, preprint: Preprint, isPreprintAuthor = false) {
super();
Expand Down
2 changes: 1 addition & 1 deletion src/backend/models/entities/Statement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Persona } from './Persona';

export class Statement extends BaseEntity {
contents!: string;
isFlagged: boolean = false;
isFlagged = false;
author!: Persona;
parent!: FullReview;

Expand Down

0 comments on commit d729a7d

Please sign in to comment.