You've already forked AstralRinth
forked from didirus/AstralRinth
fix: make icons + blog generators not break with eslint (presort) (#4980)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { compareImportSources } from '@modrinth/tooling-config/script-utils/import-sort'
|
||||
import { md } from '@modrinth/utils'
|
||||
import { promises as fs } from 'fs'
|
||||
import { glob } from 'glob'
|
||||
@@ -165,12 +166,20 @@ export const article = {
|
||||
|
||||
console.log(`📂 Compiled ${files.length} articles.`)
|
||||
|
||||
// Sort imports using simple-import-sort's algorithm to avoid ESLint reformatting
|
||||
const articleData = articlesArray.map((varName, i) => ({
|
||||
varName,
|
||||
importPath: `./${varName}`,
|
||||
exportLine: articleExports[i],
|
||||
}))
|
||||
articleData.sort((a, b) => compareImportSources(a.importPath, b.importPath))
|
||||
|
||||
const rootExport = `
|
||||
// AUTO-GENERATED FILE - DO NOT EDIT
|
||||
${articleExports.join('\n')}
|
||||
${articleData.map((a) => a.exportLine).join('\n')}
|
||||
|
||||
export const articles = [
|
||||
${articlesArray.join(',\n ')}
|
||||
${articleData.map((a) => a.varName).join(',\n ')}
|
||||
];
|
||||
`.trimStart()
|
||||
|
||||
|
||||
@@ -35,38 +35,38 @@ import { article as whats_modrinth } from "./whats_modrinth";
|
||||
import { article as windows_borderless_malware_disclosure } from "./windows_borderless_malware_disclosure";
|
||||
|
||||
export const articles = [
|
||||
windows_borderless_malware_disclosure,
|
||||
whats_modrinth,
|
||||
two_years_of_modrinth,
|
||||
two_years_of_modrinth_history,
|
||||
streamlined_version_creation,
|
||||
a_new_chapter_for_modrinth_servers,
|
||||
accelerating_development,
|
||||
becoming_sustainable,
|
||||
capital_return,
|
||||
carbon_ads,
|
||||
creator_monetization,
|
||||
creator_update,
|
||||
creator_updates_july_2025,
|
||||
creator_withdrawals_overhaul,
|
||||
design_refresh,
|
||||
download_adjustment,
|
||||
free_server_medal,
|
||||
knossos_v2_1_0,
|
||||
licensing_guide,
|
||||
modpack_changes,
|
||||
modpacks_alpha,
|
||||
modrinth_app_beta,
|
||||
modrinth_beta,
|
||||
modrinth_servers_asia,
|
||||
modrinth_servers_beta,
|
||||
new_environments,
|
||||
new_site_beta,
|
||||
plugins_resource_packs,
|
||||
pride_campaign_2025,
|
||||
redesign,
|
||||
russian_censorship,
|
||||
skins_now_in_modrinth_app,
|
||||
standing_by_our_values,
|
||||
standing_by_our_values_russian,
|
||||
skins_now_in_modrinth_app,
|
||||
russian_censorship,
|
||||
redesign,
|
||||
pride_campaign_2025,
|
||||
plugins_resource_packs,
|
||||
new_site_beta,
|
||||
new_environments,
|
||||
modrinth_servers_beta,
|
||||
modrinth_servers_asia,
|
||||
modrinth_beta,
|
||||
modrinth_app_beta,
|
||||
modpacks_alpha,
|
||||
modpack_changes,
|
||||
licensing_guide,
|
||||
knossos_v2_1_0,
|
||||
free_server_medal,
|
||||
download_adjustment,
|
||||
design_refresh,
|
||||
creator_withdrawals_overhaul,
|
||||
creator_updates_july_2025,
|
||||
creator_update,
|
||||
creator_monetization,
|
||||
carbon_ads,
|
||||
capital_return,
|
||||
becoming_sustainable,
|
||||
accelerating_development,
|
||||
a_new_chapter_for_modrinth_servers
|
||||
streamlined_version_creation,
|
||||
two_years_of_modrinth,
|
||||
two_years_of_modrinth_history,
|
||||
whats_modrinth,
|
||||
windows_borderless_malware_disclosure
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user