Skip to content

Fix lint errors, migrate ESLint flat config, and export PostResult type - #1

Merged
fishcharlie merged 4 commits into
mainfrom
copilot/fix-lint-errors
Apr 15, 2026
Merged

fishcharlie merged 4 commits into
mainfrom
copilot/fix-lint-errors

Conversation

Copilot AI commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all ESLint errors in src/Poster.ts, migrates the ESLint configuration to the modern flat-config format (required by ESLint v10), and exports the new PostResult interface so the changes remain non-breaking for TypeScript consumers.

Changes

ESLint migration

  • Replaced .eslintrc.json + .eslintignore with eslint.config.js (flat config) using @typescript-eslint/eslint-plugin's flat/recommended preset

src/Poster.ts type improvements

  • Introduced PostResult interface (now exported) replacing {[key: string]: any} / GeneralObject<any> across all post, repost, and reply overload signatures
  • Typed blurhash pixel arrays as number[] instead of any[]
  • Fixed Mastodon image attachment to use masto.js's properly-typed camelCase field (mediaIds) instead of bypassing types with snake_case media_ids + as any
  • catch (e) {} → catch {} in three empty catch blocks
  • Merged let imageKey declaration + assignment into const imageKey = randomUUID()
  • Removed unused UUID and GeneralObject imports

Non-breaking fix

PostResult is now exported from both src/Poster.ts and src/index.ts. Consumers can import it directly:

import { PostResult } from 'social-media-manager';

Copilot AI requested a review from fishcharlie April 15, 2026 20:03
@fishcharlie
fishcharlie marked this pull request as ready for review April 15, 2026 20:11
@fishcharlie
fishcharlie merged commit 7de8020 into main Apr 15, 2026
4 checks passed
@fishcharlie
fishcharlie deleted the copilot/fix-lint-errors branch April 15, 2026 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants