From 765f1ede668f70e3af7717bf4d5f05dbf009c7f8 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 10 Feb 2024 23:12:01 -0500 Subject: Eslint rule updates (#665) * Padding newline rules * Update rules * Update rules * Update rules * Updates * Update object quotes * Merge similar ts and js rules * Change export spacing rules * Move typescript-eslint rules * Spacing * Actually save and commit changes --- dev/bin/build.js | 5 +++-- dev/generate-css-json.js | 5 ++++- dev/lib/dexie.js | 1 + dev/lib/parse5.js | 1 + dev/lib/ucs2length.js | 4 +++- dev/lib/wanakana.js | 1 + dev/lib/z-worker.js | 1 + dev/lib/zip.js | 1 + dev/manifest-util.js | 1 - 9 files changed, 15 insertions(+), 5 deletions(-) (limited to 'dev') diff --git a/dev/bin/build.js b/dev/bin/build.js index 190964d5..bc0a8cb8 100644 --- a/dev/bin/build.js +++ b/dev/bin/build.js @@ -23,10 +23,10 @@ import JSZip from 'jszip'; import {fileURLToPath} from 'node:url'; import path from 'path'; import readline from 'readline'; +import {parseArgs} from 'util'; import {buildLibs} from '../build-libs.js'; import {ManifestUtil} from '../manifest-util.js'; import {getAllFiles, testMain} from '../util.js'; -import {parseArgs} from 'util'; const dirname = path.dirname(fileURLToPath(import.meta.url)); @@ -267,7 +267,8 @@ export async function main(argv) { await buildLibs(); const variantNames = /** @type {string[]} */ (( argv.length === 0 || args.all ? - manifestUtil.getVariants().filter(({buildable}) => buildable !== false).map(({name}) => name) : [] + manifestUtil.getVariants().filter(({buildable}) => buildable !== false).map(({name}) => name) : + [] )); await build(buildDir, extDir, manifestUtil, variantNames, manifestPath, dryRun, dryRunBuildZip, yomitanVersion); } finally { diff --git a/dev/generate-css-json.js b/dev/generate-css-json.js index b196e411..26bdfa64 100644 --- a/dev/generate-css-json.js +++ b/dev/generate-css-json.js @@ -151,7 +151,10 @@ export function generateRules(cssFilePath, overridesCssFilePath) { const styles = []; if (typeof declarations !== 'undefined') { for (const declaration of declarations) { - if (declaration.type !== 'declaration') { console.log(declaration); continue; } + if (declaration.type !== 'declaration') { + console.log(declaration); + continue; + } const {property, value} = /** @type {css.Declaration} */ (declaration); if (typeof property !== 'string' || typeof value !== 'string') { continue; } styles.push([property, value]); diff --git a/dev/lib/dexie.js b/dev/lib/dexie.js index 834260e0..ffbd2923 100644 --- a/dev/lib/dexie.js +++ b/dev/lib/dexie.js @@ -14,6 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + import Dexie from 'dexie'; import 'dexie-export-import'; diff --git a/dev/lib/parse5.js b/dev/lib/parse5.js index 03249db4..ce92730d 100644 --- a/dev/lib/parse5.js +++ b/dev/lib/parse5.js @@ -14,4 +14,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + export * from 'parse5'; diff --git a/dev/lib/ucs2length.js b/dev/lib/ucs2length.js index ce9027de..7ca3c545 100644 --- a/dev/lib/ucs2length.js +++ b/dev/lib/ucs2length.js @@ -14,7 +14,9 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + import ucs2length from 'ajv/dist/runtime/ucs2length.js'; + const ucs2length2 = ucs2length.default; -export {ucs2length2 as ucs2length}; +export {ucs2length2 as ucs2length}; diff --git a/dev/lib/wanakana.js b/dev/lib/wanakana.js index b2679cec..24cf63ab 100644 --- a/dev/lib/wanakana.js +++ b/dev/lib/wanakana.js @@ -14,4 +14,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + export * from 'wanakana'; diff --git a/dev/lib/z-worker.js b/dev/lib/z-worker.js index 142ed8fc..4e5fe318 100644 --- a/dev/lib/z-worker.js +++ b/dev/lib/z-worker.js @@ -14,4 +14,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + import '../../node_modules/@zip.js/zip.js/lib/z-worker.js'; diff --git a/dev/lib/zip.js b/dev/lib/zip.js index 007b4285..62d0784c 100644 --- a/dev/lib/zip.js +++ b/dev/lib/zip.js @@ -14,4 +14,5 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + export * from '@zip.js/zip.js/lib/zip.js'; diff --git a/dev/manifest-util.js b/dev/manifest-util.js index 6ab81790..741f8b31 100644 --- a/dev/manifest-util.js +++ b/dev/manifest-util.js @@ -342,4 +342,3 @@ export class ManifestUtil { return modifiedManifest; } } - -- cgit v1.2.3