Fixed linting 😃

Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
2020-02-06 21:18:11 +01:00
parent c4775134de
commit fee40613f1
16 changed files with 249 additions and 157 deletions

View File

@ -21,6 +21,17 @@ export interface PostHeader {
export default class Post implements PostInterface {
public slug: string
public title: string = ''
public content: string = ''
public isStarted = false
public header?: PostHeader
public constructor(slug: string) {
this.slug = slug
}
public static async fetchAll(): Promise<Array<Post>> {
const files: Array<string> = ((require as any).context('../posts', true, /\.md$/)).keys()
const posts: Array<Post> = []
@ -30,16 +41,6 @@ export default class Post implements PostInterface {
return posts
}
public slug: string
public title: string
public content: string
public isStarted = false
public header: PostHeader
constructor(slug: string) {
this.slug = slug
}
public async fetch() {
if (!this.slug.endsWith('.md')) {