From 4e77741d22778bd09b772fc53f1cbd64107e3d24 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 16 Feb 2024 19:37:01 -0500 Subject: Even more eslint rules (#696) * capitalized-comments * Turn rules on * Add miscellaneous rules * More rules --- dev/generate-css-json.js | 1 + dev/util.js | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'dev') diff --git a/dev/generate-css-json.js b/dev/generate-css-json.js index a837c9e2..adb75495 100644 --- a/dev/generate-css-json.js +++ b/dev/generate-css-json.js @@ -91,6 +91,7 @@ function removeProperty(styles, property, removedProperties) { * @returns {string} */ export function formatRulesJson(rules) { + // This is similar to the following code, but formatted a but more succinctly: // return JSON.stringify(rules, null, 4); const indent1 = ' '; const indent2 = indent1.repeat(2); diff --git a/dev/util.js b/dev/util.js index eee16964..817b0d84 100644 --- a/dev/util.js +++ b/dev/util.js @@ -57,7 +57,7 @@ export function getAllFiles(baseDirectory, predicate = null) { export function createDictionaryArchive(dictionaryDirectory, dictionaryName) { const fileNames = fs.readdirSync(dictionaryDirectory); - // const zipFileWriter = new BlobWriter(); + // Const zipFileWriter = new BlobWriter(); // const zipWriter = new ZipWriter(zipFileWriter); const archive = new JSZip(); @@ -70,7 +70,7 @@ export function createDictionaryArchive(dictionaryDirectory, dictionaryName) { } archive.file(fileName, JSON.stringify(json, null, 0)); - // await zipWriter.add(fileName, new TextReader(JSON.stringify(json, null, 0))); + // Await zipWriter.add(fileName, new TextReader(JSON.stringify(json, null, 0))); } else { const content = fs.readFileSync(path.join(dictionaryDirectory, fileName), {encoding: null}); archive.file(fileName, content); @@ -83,14 +83,14 @@ export function createDictionaryArchive(dictionaryDirectory, dictionaryName) { // console.log('??'); } } - // await zipWriter.close(); + // Await zipWriter.close(); // Retrieves the Blob object containing the zip content into `zipFileBlob`. It // is also returned by zipWriter.close() for more convenience. // const zipFileBlob = await zipFileWriter.getData(); return archive; - // return zipFileBlob; + // Return zipFileBlob; } /** -- cgit v1.2.3