From 10a76a5bf0a9d051aa9432566088034c5ced714b Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Wed, 14 Feb 2024 17:15:11 +0100 Subject: Lint --- lib/generators/html.js | 5 +---- lib/generators/rss.js | 4 +--- lib/generators/static.js | 7 +++---- lib/generators/txt.js | 4 +--- 4 files changed, 6 insertions(+), 14 deletions(-) (limited to 'lib/generators') diff --git a/lib/generators/html.js b/lib/generators/html.js index f7c7966..2004696 100644 --- a/lib/generators/html.js +++ b/lib/generators/html.js @@ -1,5 +1,3 @@ -'use strict'; - import Dot from 'dot'; import { readFile, writeFile } from 'fs/promises'; import { join } from 'path'; @@ -34,5 +32,4 @@ export default async function HTMLGenerator(source, target, posts) { strip: false })({ posts }); await writeFile(indexTarget, indexHtml); -}; - +} diff --git a/lib/generators/rss.js b/lib/generators/rss.js index a46a394..c47ba03 100644 --- a/lib/generators/rss.js +++ b/lib/generators/rss.js @@ -1,5 +1,3 @@ -'use strict'; - import Dot from 'dot'; import { encodeXML } from 'entities'; import { readFile, writeFile } from 'fs/promises'; @@ -50,4 +48,4 @@ export default async function RSSGenerator(source, target, posts) { strip: false })({ posts }); await writeFile(feedTarget, feedXml); -}; +} diff --git a/lib/generators/static.js b/lib/generators/static.js index 60719e2..45f5a04 100644 --- a/lib/generators/static.js +++ b/lib/generators/static.js @@ -1,5 +1,3 @@ -'use strict'; - import { access, cp, readdir } from 'fs/promises'; import { constants } from 'fs'; import { join } from 'path'; @@ -33,7 +31,8 @@ export default async function StaticGenerator(source, target, _) { if (entry.isDirectory()) { await cp(sourceAsset, targetAsset, { recursive: true }); - } else { + } + else { await cp(sourceAsset, targetAsset); } } @@ -46,4 +45,4 @@ export default async function StaticGenerator(source, target, _) { throw error; } -}; +} diff --git a/lib/generators/txt.js b/lib/generators/txt.js index dddcbaf..c3d7778 100644 --- a/lib/generators/txt.js +++ b/lib/generators/txt.js @@ -1,5 +1,3 @@ -'use strict'; - import Dot from 'dot'; import { readFile, writeFile } from 'fs/promises'; import { join } from 'path'; @@ -34,4 +32,4 @@ export default async function TXTGenerator(source, target, posts) { strip: false })({ posts }); await writeFile(textTarget, text); -}; +} -- cgit