diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 16:47:50 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-06-26 16:47:50 -0300 |
commit | 1f68407db59a723cf78e050b7da0b73daa732a08 (patch) | |
tree | 4c5aa0cbd00f49ad8d810cf64b9582b75fb41d58 | |
parent | 4075254c9e38be6741527e1fb535eed444e6ad08 (diff) |
add @format pragma to JS files
41 files changed, 82 insertions, 0 deletions
diff --git a/src/data/cacheable-object.js b/src/data/cacheable-object.js index 76efbd83..47281939 100644 --- a/src/data/cacheable-object.js +++ b/src/data/cacheable-object.js @@ -1,3 +1,5 @@ +// @format +// // Generally extendable class for caching properties and handling dependencies, // with a few key properties: // diff --git a/src/data/patches.js b/src/data/patches.js index 0ff56ad0..937fb099 100644 --- a/src/data/patches.js +++ b/src/data/patches.js @@ -1,3 +1,5 @@ +// @format +// // --> Patch export class Patch { diff --git a/src/data/serialize.js b/src/data/serialize.js index fc84d1ef..13b20e13 100644 --- a/src/data/serialize.js +++ b/src/data/serialize.js @@ -1,3 +1,5 @@ +// @format +// // serialize-util.js: simple interface and utility functions for converting // Things into a directly serializeable format diff --git a/src/data/things.js b/src/data/things.js index 62c01411..c86add30 100644 --- a/src/data/things.js +++ b/src/data/things.js @@ -1,3 +1,5 @@ +// @format +// // things.js: class definitions for various object types used across the wiki, // most of which correspond to an output page, such as Track, Album, Artist diff --git a/src/data/validators.js b/src/data/validators.js index 714dc3a0..eab26896 100644 --- a/src/data/validators.js +++ b/src/data/validators.js @@ -1,3 +1,5 @@ +// @format + import { withAggregate } from "../util/sugar.js"; import { color, ENABLE_COLOR, decorateTime } from "../util/cli.js"; diff --git a/src/data/yaml.js b/src/data/yaml.js index cfbb985a..5058bb39 100644 --- a/src/data/yaml.js +++ b/src/data/yaml.js @@ -1,3 +1,5 @@ +// @format +// // yaml.js - specification for HSMusic YAML data file format and utilities for // loading and processing YAML files and documents diff --git a/src/file-size-preloader.js b/src/file-size-preloader.js index d179e569..e34cee50 100644 --- a/src/file-size-preloader.js +++ b/src/file-size-preloader.js @@ -1,3 +1,5 @@ +// @format +// // Very simple, bare-bones file size loader which takes a bunch of file // paths, gets their filesizes, and resolves a promise when it's done. // diff --git a/src/gen-thumbs.js b/src/gen-thumbs.js index 9e78d38d..cd7196d4 100644 --- a/src/gen-thumbs.js +++ b/src/gen-thumbs.js @@ -1,5 +1,7 @@ #!/usr/bin/env node +// @format +// // Ok, so the d8te is 3 March 2021, and the music wiki was initially released // on 15 November 2019. That is 474 days or 11376 hours. In my opinion, and // pro8a8ly the opinions of at least one other person, that is WAY TOO LONG diff --git a/src/listing-spec.js b/src/listing-spec.js index 92b9d9db..f561cef4 100644 --- a/src/listing-spec.js +++ b/src/listing-spec.js @@ -1,3 +1,5 @@ +// @format + import fixWS from "fix-whitespace"; import { diff --git a/src/misc-templates.js b/src/misc-templates.js index 4f3a75d0..f0e0edfc 100644 --- a/src/misc-templates.js +++ b/src/misc-templates.js @@ -1,3 +1,5 @@ +// @format +// // Miscellaneous utility functions which are useful across page specifications. // These are made available right on a page spec's ({wikiData, language, ...}) // args object! diff --git a/src/page/album-commentary.js b/src/page/album-commentary.js index 3c197239..b469838d 100644 --- a/src/page/album-commentary.js +++ b/src/page/album-commentary.js @@ -1,3 +1,5 @@ +// @format +// // Album commentary page and index specifications. // Imports diff --git a/src/page/album.js b/src/page/album.js index 48747d7f..f015976f 100644 --- a/src/page/album.js +++ b/src/page/album.js @@ -1,3 +1,5 @@ +// @format +// // Album page specification. // Imports diff --git a/src/page/artist-alias.js b/src/page/artist-alias.js index 4fc129e9..8a45503d 100644 --- a/src/page/artist-alias.js +++ b/src/page/artist-alias.js @@ -1,3 +1,5 @@ +// @format +// // Artist alias redirect pages. // (Makes old permalinks bring visitors to the up-to-date page.) diff --git a/src/page/artist.js b/src/page/artist.js index 8be20106..314d2aa2 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -1,3 +1,5 @@ +// @format +// // Artist page specification. // // NB: See artist-alias.js for artist alias redirect pages. diff --git a/src/page/flash.js b/src/page/flash.js index 4d8b9f11..864f44de 100644 --- a/src/page/flash.js +++ b/src/page/flash.js @@ -1,3 +1,5 @@ +// @format +// // Flash page and index specifications. // Imports diff --git a/src/page/group.js b/src/page/group.js index bea9ecc7..b6f99785 100644 --- a/src/page/group.js +++ b/src/page/group.js @@ -1,3 +1,5 @@ +// @format +// // Group page specifications. // Imports diff --git a/src/page/homepage.js b/src/page/homepage.js index ebe3a8d3..8d20accf 100644 --- a/src/page/homepage.js +++ b/src/page/homepage.js @@ -1,3 +1,5 @@ +// @format +// // Homepage specification. // Imports diff --git a/src/page/index.js b/src/page/index.js index 50fbd7a4..3d7e6fa8 100644 --- a/src/page/index.js +++ b/src/page/index.js @@ -1,3 +1,5 @@ +// @format +// // NB: This is the index for the page/ directory and contains exports for all // other modules here! It's not the page spec for the homepage - see // homepage.js for that. diff --git a/src/page/listing.js b/src/page/listing.js index 886c8a9d..69fa4919 100644 --- a/src/page/listing.js +++ b/src/page/listing.js @@ -1,3 +1,5 @@ +// @format +// // Listing page specification. // // The targets here are a bit different than for most pages: rather than data diff --git a/src/page/news.js b/src/page/news.js index 2fc5d7b0..b988e348 100644 --- a/src/page/news.js +++ b/src/page/news.js @@ -1,3 +1,5 @@ +// @format +// // News entry & index page specifications. // Imports diff --git a/src/page/static.js b/src/page/static.js index 39acd64e..ecd77c9a 100644 --- a/src/page/static.js +++ b/src/page/static.js @@ -1,3 +1,5 @@ +// @format +// // Static content page specification. (These are static pages coded into the // wiki data folder, used for a variety of purposes, e.g. wiki info, // changelog, and so on.) diff --git a/src/page/tag.js b/src/page/tag.js index 98b552b3..efd95e16 100644 --- a/src/page/tag.js +++ b/src/page/tag.js @@ -1,3 +1,5 @@ +// @format +// // Art tag page specification. // Imports diff --git a/src/page/track.js b/src/page/track.js index 15316e8f..5827197d 100644 --- a/src/page/track.js +++ b/src/page/track.js @@ -1,3 +1,5 @@ +// @format +// // Track page specification. // Imports diff --git a/src/repl.js b/src/repl.js index 1a694d7e..5826d230 100644 --- a/src/repl.js +++ b/src/repl.js @@ -1,3 +1,5 @@ +// @format + import * as os from "os"; import * as path from "path"; import * as repl from "repl"; diff --git a/src/static/client.js b/src/static/client.js index 72fa9cc2..d68358ba 100644 --- a/src/static/client.js +++ b/src/static/client.js @@ -1,3 +1,5 @@ +// @format +// // This is the JS file that gets loaded on the client! It's only really used for // the random track feature right now - the idea is we only use it for stuff // that cannot 8e done at static-site compile time, 8y its fundamentally diff --git a/src/static/lazy-loading.js b/src/static/lazy-loading.js index 230dad21..5ca9fb38 100644 --- a/src/static/lazy-loading.js +++ b/src/static/lazy-loading.js @@ -1,3 +1,5 @@ +// @format +// // Lazy loading! Roll your own. Woot. // This file includes a 8unch of fall8acks and stuff like that, and is written // with fairly Olden JavaScript(TM), so as to work on pretty much any 8rowser diff --git a/src/upd8.js b/src/upd8.js index 576166aa..cff43135 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -1,5 +1,7 @@ #!/usr/bin/env node +// @format + // HEY N8RDS! // // This is one of the 8ACKEND FILES. It's not used anywhere on the actual site diff --git a/src/url-spec.js b/src/url-spec.js index cd35abed..0defcedd 100644 --- a/src/url-spec.js +++ b/src/url-spec.js @@ -1,3 +1,5 @@ +// @format + import { withEntries } from "./util/sugar.js"; const urlSpec = { diff --git a/src/util/cli.js b/src/util/cli.js index e073bed8..159d526b 100644 --- a/src/util/cli.js +++ b/src/util/cli.js @@ -1,3 +1,5 @@ +// @format +// // Utility functions for CLI- and de8ugging-rel8ted stuff. // // A 8unch of these depend on process.stdout 8eing availa8le, so they won't diff --git a/src/util/colors.js b/src/util/colors.js index 4450a49f..8d6b24df 100644 --- a/src/util/colors.js +++ b/src/util/colors.js @@ -1,3 +1,5 @@ +// @format +// // Color and theming utility functions! Handy. // Graciously stolen from https://stackoverflow.com/a/54071699! ::::) diff --git a/src/util/find.js b/src/util/find.js index 49a3a19a..6ee0583c 100644 --- a/src/util/find.js +++ b/src/util/find.js @@ -1,3 +1,5 @@ +// @format + import { color, logError, logWarn } from "./cli.js"; import { inspect } from "util"; diff --git a/src/util/html.js b/src/util/html.js index ceca5966..913dc7b2 100644 --- a/src/util/html.js +++ b/src/util/html.js @@ -1,3 +1,5 @@ +// @format +// // Some really simple functions for formatting HTML content. // COMPREHENSIVE! diff --git a/src/util/io.js b/src/util/io.js index c17e2633..6ea1e221 100644 --- a/src/util/io.js +++ b/src/util/io.js @@ -1,3 +1,5 @@ +// @format +// // Utility functions for interacting with files and other external data // interfacey constructs. diff --git a/src/util/link.js b/src/util/link.js index 0e3be3e5..4095b17d 100644 --- a/src/util/link.js +++ b/src/util/link.js @@ -1,3 +1,5 @@ +// @format +// // This file is essentially one level of a8straction a8ove urls.js (and the // urlSpec it gets its paths from). It's a 8unch of utility functions which // take certain types of wiki data o8jects (colloquially known as "things") diff --git a/src/util/magic-constants.js b/src/util/magic-constants.js index c59e14aa..a7b29332 100644 --- a/src/util/magic-constants.js +++ b/src/util/magic-constants.js @@ -1,3 +1,5 @@ +// @format +// // Magic constants only! These are hard-coded, and any use of them should be // considered a flaw in the codebase - areas where we use hard-coded behavior // to support one use of the wiki software (i.e. HSMusic, usually), rather than diff --git a/src/util/node-utils.js b/src/util/node-utils.js index 889a276c..f638e4ad 100644 --- a/src/util/node-utils.js +++ b/src/util/node-utils.js @@ -1,3 +1,5 @@ +// @format +// // Utility functions which are only relevant to particular Node.js constructs. import { fileURLToPath } from "url"; diff --git a/src/util/replacer.js b/src/util/replacer.js index 311f7633..10603b6c 100644 --- a/src/util/replacer.js +++ b/src/util/replacer.js @@ -1,3 +1,5 @@ +// @format + import { logError, logWarn } from "./cli.js"; import { escapeRegex } from "./sugar.js"; diff --git a/src/util/serialize.js b/src/util/serialize.js index 57736cf4..ab864836 100644 --- a/src/util/serialize.js +++ b/src/util/serialize.js @@ -1,3 +1,5 @@ +// @format + export function serializeLink(thing) { const ret = {}; ret.name = thing.name; diff --git a/src/util/sugar.js b/src/util/sugar.js index 70672bfd..a4504daa 100644 --- a/src/util/sugar.js +++ b/src/util/sugar.js @@ -1,3 +1,5 @@ +// @format +// // Syntactic sugar! (Mostly.) // Generic functions - these are useful just a8out everywhere. // diff --git a/src/util/urls.js b/src/util/urls.js index 8fc2aba7..4e398082 100644 --- a/src/util/urls.js +++ b/src/util/urls.js @@ -1,3 +1,5 @@ +// @format +// // Code that deals with URLs (really the pathnames that get referenced all // throughout the gener8ted HTML). Most nota8ly here is generateURLs, which // is in charge of pre-gener8ting a complete network of template strings diff --git a/src/util/wiki-data.js b/src/util/wiki-data.js index f7610fdb..7e16580d 100644 --- a/src/util/wiki-data.js +++ b/src/util/wiki-data.js @@ -1,3 +1,5 @@ +// @format +// // Utility functions for interacting with wiki data. // Generic value operations |