* ci: fix ci

* fix(eslint): remove code comment
This commit is contained in:
Erb3 2024-08-26 20:21:46 +02:00 committed by GitHub
parent 9fd0f6834a
commit 656c5b61cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 216 additions and 220 deletions

View File

@ -1,6 +1,6 @@
const { resolve } = require("node:path"); const { resolve } = require('node:path')
const project = resolve(process.cwd(), "tsconfig.json"); const project = resolve(process.cwd(), 'tsconfig.json')
module.exports = { module.exports = {
extends: [ extends: [
@ -12,19 +12,16 @@ module.exports = {
'plugin:import/typescript', 'plugin:import/typescript',
'turbo', 'turbo',
], ],
parserOptions: {
project,
},
globals: { globals: {
React: true, React: true,
JSX: true, JSX: true,
}, },
settings: { settings: {
"import/resolver": { 'import/resolver': {
typescript: { typescript: {
project, project,
}, },
}, },
}, },
ignorePatterns: ["node_modules/", "dist/"], ignorePatterns: ['node_modules/', 'dist/'],
}; }

View File

@ -1,10 +1,10 @@
const BASE62_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' as const; const BASE62_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' as const
type Base62Char = typeof BASE62_CHARS[number]; type Base62Char = (typeof BASE62_CHARS)[number]
declare global { declare global {
type ModrinthId = `${Base62Char}`[]; type ModrinthId = `${Base62Char}`[]
type Environment = 'required' | 'optional' | 'unsupported' | 'unknown'; type Environment = 'required' | 'optional' | 'unsupported' | 'unknown'
type RequestableStatus = 'approved' | 'archived' | 'unlisted' | 'private' type RequestableStatus = 'approved' | 'archived' | 'unlisted' | 'private'
type ApprovedStatus = RequestableStatus | 'scheduled' type ApprovedStatus = RequestableStatus | 'scheduled'
@ -12,137 +12,136 @@ declare global {
type ProjectStatus = ApprovedStatus | UnapprovedStatus | 'unknown' type ProjectStatus = ApprovedStatus | UnapprovedStatus | 'unknown'
type DonationPlatform = type DonationPlatform =
{ short: "patreon", name: "Patreon" } | { short: 'patreon'; name: 'Patreon' }
| { short: "bmac", name: "Buy Me A Coffee" } | { short: 'bmac'; name: 'Buy Me A Coffee' }
| { short: "paypal", name: "PayPal" } | { short: 'paypal'; name: 'PayPal' }
| { short: "github", name: "GitHub Sponsors" } | { short: 'github'; name: 'GitHub Sponsors' }
| { short: "ko-fi", name: "Ko-fi" } | { short: 'ko-fi'; name: 'Ko-fi' }
| | { short: 'other'; name: 'Other' }
| { short: "other", name: "Other" }
type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader' type ProjectType = 'mod' | 'modpack' | 'resourcepack' | 'shader'
type MonetizationStatus = 'monetized' | 'demonetized' | 'force-demonetized' type MonetizationStatus = 'monetized' | 'demonetized' | 'force-demonetized'
type GameVersion = string; type GameVersion = string
type Platform = string; type Platform = string
type Category = string; type Category = string
type CategoryOrPlatform = Category | Platform type CategoryOrPlatform = Category | Platform
interface DonationLink<T extends DonationPlatform> { interface DonationLink<T extends DonationPlatform> {
id: T["short"], id: T['short']
platform: T["name"], platform: T['name']
url: string url: string
} }
interface GalleryImage { interface GalleryImage {
url: string, url: string
featured: boolean, featured: boolean
created: string, created: string
ordering: number, ordering: number
title?: string, title?: string
description?: string, description?: string
} }
interface Project { interface Project {
id: ModrinthId, id: ModrinthId
project_type: ProjectType, project_type: ProjectType
slug: string, slug: string
title: string, title: string
description: string, description: string
status: ProjectStatus, status: ProjectStatus
requested_status: RequestableStatus, requested_status: RequestableStatus
monetization_status: MonetizationStatus, monetization_status: MonetizationStatus
body: string, body: string
icon_url?: string, icon_url?: string
color?: number, color?: number
categories: Category[], categories: Category[]
additional_categories: Category[], additional_categories: Category[]
downloads: number, downloads: number
followers: number, followers: number
client_side: Environment, client_side: Environment
server_side: Environment, server_side: Environment
team: ModrinthId, team: ModrinthId
thread_id: ModrinthId, thread_id: ModrinthId
issues_url?: string, issues_url?: string
source_url?: string, source_url?: string
wiki_url?: string, wiki_url?: string
discord_url?: string, discord_url?: string
donation_urls: DonationLink[], donation_urls: DonationLink[]
published: string, published: string
updated: string, updated: string
approved: string, approved: string
queued: string, queued: string
game_versions: GameVersion[], game_versions: GameVersion[]
loaders: Platform[], loaders: Platform[]
versions: ModrinthId[], versions: ModrinthId[]
gallery?: GalleryImage[] gallery?: GalleryImage[]
license: { license: {
id: string, id: string
name, string, name
url?: string, string
}, url?: string
}
} }
interface SearchResult { interface SearchResult {
id: ModrinthId, id: ModrinthId
project_type: ProjectType, project_type: ProjectType
slug: string, slug: string
title: string, title: string
description: string, description: string
monetization_status: MonetizationStatus, monetization_status: MonetizationStatus
icon_url?: string, icon_url?: string
color?: number, color?: number
categories: CategoryOrPlatform[], categories: CategoryOrPlatform[]
display_categories: CategoryOrPlatform[], display_categories: CategoryOrPlatform[]
versions: GameVersion[], versions: GameVersion[]
latest_version: GameVersion, latest_version: GameVersion
downloads: number, downloads: number
follows: number, follows: number
client_side: Environment, client_side: Environment
server_side: Environment, server_side: Environment
author: string, author: string
date_created: string, date_created: string
date_modified: string, date_modified: string
gallery: string[] gallery: string[]
featured_gallery?: string[] featured_gallery?: string[]
license: string, license: string
} }
type DependencyType = 'required' | 'optional' | 'incompatible' | 'embedded' type DependencyType = 'required' | 'optional' | 'incompatible' | 'embedded'
interface VersionDependency { interface VersionDependency {
dependency_type: DependencyType, dependency_type: DependencyType
file_name?: string, file_name?: string
} }
interface ProjectDependency { interface ProjectDependency {
dependency_type: DependencyType, dependency_type: DependencyType
project_id?: string, project_id?: string
} }
interface FileDependency { interface FileDependency {
dependency_type: DependencyType, dependency_type: DependencyType
file_name?: string, file_name?: string
} }
type Dependency = VersionDependency | ProjectDependency | FileDependency type Dependency = VersionDependency | ProjectDependency | FileDependency
@ -151,42 +150,42 @@ declare global {
type FileType = 'required-resource-pack' | 'optional-resource-pack' type FileType = 'required-resource-pack' | 'optional-resource-pack'
interface VersionFileHash { interface VersionFileHash {
sha512: string, sha512: string
sha1: string, sha1: string
} }
interface VersionFile { interface VersionFile {
hashes: VersionFileHash[], hashes: VersionFileHash[]
url: string, url: string
filename: string, filename: string
primary: boolean, primary: boolean
size: number, size: number
file_type?: FileType file_type?: FileType
} }
interface Version { interface Version {
name: string, name: string
version_number: string, version_number: string
changelog?: string, changelog?: string
dependencies: Dependency[], dependencies: Dependency[]
game_versions: GameVersion[], game_versions: GameVersion[]
version_type: VersionChannel, version_type: VersionChannel
loaders: Platform[], loaders: Platform[]
featured: boolean, featured: boolean
status: VersionStatus, status: VersionStatus
id: ModrinthId, id: ModrinthId
project_id: ModrinthId, project_id: ModrinthId
author_id: ModrinthId, author_id: ModrinthId
date_published: string, date_published: string
downloads: number, downloads: number
files: VersionFile[], files: VersionFile[]
} }
interface PayoutData { interface PayoutData {
balance: number, balance: number
payout_wallet: 'paypal' | 'venmo', payout_wallet: 'paypal' | 'venmo'
payout_wallet_type: 'email' | 'phone' | 'user_handle', payout_wallet_type: 'email' | 'phone' | 'user_handle'
payout_address: string, payout_address: string
} }
type UserRole = 'admin' | 'moderator' | 'pyro' | 'developer' type UserRole = 'admin' | 'moderator' | 'pyro' | 'developer'
@ -201,21 +200,21 @@ declare global {
TRANSLATOR = 1 << 6, TRANSLATOR = 1 << 6,
} }
type UserBadges = number; type UserBadges = number
interface User { interface User {
username: string, username: string
email?: string, email?: string
bio?: string, bio?: string
payout_data?: PayoutData, payout_data?: PayoutData
id: ModrinthId, id: ModrinthId
avatar_url: string, avatar_url: string
created: string, created: string
role: UserRole, role: UserRole
badges: UserBadges, badges: UserBadges
auth_providers?: string[], auth_providers?: string[]
email_verified?: boolean, email_verified?: boolean
has_password?: boolean, has_password?: boolean
has_totp?: boolean has_totp?: boolean
} }
@ -232,15 +231,15 @@ declare global {
VIEW_PAYOUTS = 1 << 9, VIEW_PAYOUTS = 1 << 9,
} }
type TeamMemberPermissions = number; type TeamMemberPermissions = number
interface TeamMember { interface TeamMember {
team_id: ModrinthId, team_id: ModrinthId
user: User, user: User
role: string, role: string
permissions: TeamMemberPermissions, permissions: TeamMemberPermissions
accepted: boolean, accepted: boolean
payouts_split: number, payouts_split: number
ordering: number, ordering: number
} }
} }