Commit Graph
109 Commits
Author SHA1 Message Date
dependabot[bot]andTony 417ab04f06 chore(deps-dev): bump eslint-plugin-unicorn from 66.0.0 to 68.0.0 (#22310)
* chore(deps-dev): bump eslint-plugin-unicorn from 66.0.0 to 68.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 66.0.0 to 68.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v66.0.0...v68.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 68.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: fix no-useless-coercion

* style: fix prefer-boolean-return

* style: fix no-useless-logical-operand

* style: fix prefer-single-replace

* style: fix consistent-conditional-object-spread

* style: fix no-useless-else

* style: fix prefer-unicode-code-point-escapes

* style: fix operator-assignment

* style: fix prefer-continue

* style: fix prefer-math-constants

* style: fix prefer-hoisting-branch-code

* style: fix prefer-array-slice

* style: fix consistent-class-member-order

* style: fix no-return-array-push

* style: fix prefer-promise-with-resolvers

* style: fix no-array-concat-in-loop

* style: fix no-loop-iterable-mutation

* style: fix no-invalid-argument-count

* style: fix no-duplicate-if-branches

* style: fix prefer-else-if

* style: fix no-unreadable-for-of-expression

* style: fix logical-assignment-operators

* style: fix default-export-style

* style: revert false positve in prefer-type-literal-last in #22274

* style: fix arrow-body-style

* style: add v68 recommended preset

* style: refactor GraphQL queries to use template literals for better readability

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-06-20 23:11:27 +08:00
dependabot[bot]andTony 873618e99d chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0 (#22274)
* chore(deps-dev): bump eslint-plugin-unicorn from 65.0.1 to 66.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 65.0.1 to 66.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v65.0.1...v66.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 66.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: fix unicorn-js/prefer-url-href

* style: oxlint disable

* style: fix unicorn-js/no-useless-else

* style: no-unsafe-string-replacement

* style: fix no-duplicate-loops

* style: fix prefer-number-is-safe-integer

* style: fix prefer-single-array-predicate

* style: fix no-object-methods-with-collections

* style: fix no-useless-boolean-cast

* style: fix no-useless-template-literals

* style: fix no-negated-array-predicate

* style: fix prefer-direct-iteration

* style: fix consistent-optional-chaining

* style: fix prefer-simple-sort-comparator

* style: fix prefer-global-number-constants

* style: fix prefer-type-literal-last

* style: fix require-array-sort-compare.

* style: fix prefer-early-return

* style: fix prefer-short-arrow-method

* style: fix prefer-array-from-map

* style: fix prefer-scoped-selector

* style: fix no-global-object-property-assignment

* style: fix no-unnecessary-global-this

* style: fix no-unreadable-object-destructuring

* style: fix no-invalid-argument-count

* style: fix prefer-smaller-scope

* style: fix prefer-iterator-to-array.

* style: fix prefer-object-iterable-methods

* style: fix typo

* style: fix max-nested-calls

* style: fix no-incorrect-template-string-interpolation

* style: fix no-break-in-nested-loop

* style: fix prefer-await

* style: fix no-computed-property-existence-check

* style: fix prefer-number-coercion

* style: fix no-empty-file

* style: update eslint unicorn v66 recommended preset

* style: add unicorn/prefer-spread to oxlint-disable comments

* style: fix no-array-reduce

* style: delete github/no-then as it's covered by unicorn/prefer-await

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-06-16 14:43:42 +08:00
dependabot[bot]andTony 07834413f5 chore(deps-dev): bump eslint-plugin-unicorn from 64.0.0 to 65.0.0 (#22219)
* chore(deps-dev): bump eslint-plugin-unicorn from 64.0.0 to 65.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 64.0.0 to 65.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v64.0.0...v65.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 65.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: no-array-from-fill

* fix: unicorn-js/no-duplicate-set-values

* fix: no-this-outside-of-class

* fix: no-unnecessary-nested-ternary

* fix: prefer-array-last-methods

* fix: prefer-queue-microtask

* fix: prefer-split-limit

* fix: no-array-from-fill

* fix: no-unused-array-method-return

* fix: prefer-single-call

* fix: prefer-includes-over-repeated-comparisons

* fix: consistent-compound-words

* fix: prefer-includes-over-repeated-comparisons

* chore: add eslint-plugin-unicorn v65 recommended preset

* fix: correct duration parsing logic in parseDuration function

* fix: update oxlint-disable

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2026-06-09 00:08:15 +08:00
Tony a98de2effd refactor: use arrow function 2026-05-11 02:16:04 +08:00
github-actions[bot] 788c549948 style: auto format 2026-05-07 20:42:08 +00:00
github-actions[bot] ebfe021b50 style: auto format 2026-04-14 15:15:05 +00:00
Cod1docandjack 013e869ce8 fix(telegram): preserve access auth params in media links (#21503)
* fix(telegram): preserve access auth params in media links

* test(telegram): sort imports in channel regression test

* chore: remove channel.test.ts

---------

Co-authored-by: jack <jack@example.com>
2026-04-09 19:59:11 +08:00
Tony 1acb805799 style: migrate eslint to oxlint (#21224)
* chore: add oxlint support

* style: apply autofix

* style: apply autofix for toSorted

* style: use alternative api for nsfw-flag jsPlugins

* fix: git diff

* fix: codeql

* test: console.log

* style: update lint workflow to use Checkstyle SARIF converter

* style: remove debug log from extractDateFromURL function

* chore: use oxlint-json-to-sarif

* test: console.log

* test: remove console.log

* test: update cookie data expectation in getCookies test

https://github.com/mccutchen/go-httpbin/pull/235 breaks this

* style: type-aware linting

* style: enable type-aware linting for oxlint
2026-02-28 21:23:11 +08:00
DIYgod cf4e772de8 refactor: replace art template with jsx (#20777)
* refactor: replace art template with jsx

* fix: tsx files

* fix: renderToString import

* fix: hono html raw import

* feat: remove art
2025-12-29 12:27:32 +08:00
github-actions[bot] edfac9f24c style: auto format 2025-11-27 05:54:33 +00:00
Tony bf9f4b5961 style: fix import 2025-11-27 11:22:19 +08:00
Stephen Zhou d5e4fba8b2 style: format 2025-11-27 11:04:48 +08:00
github-actions[bot] a28890a135 style: auto format 2025-11-27 02:55:46 +00:00
Tony 8ae3cf6f38 feat(route/telegram): add caching for input entity retrieval (#20128) 2025-09-22 22:56:01 +08:00
Tony 2566b86617 fix(route/telegram): fix channel media path overlap (#20085) 2025-09-17 21:23:48 +08:00
github-actions[bot] 4e6aa429a5 style: auto format 2025-09-16 13:42:50 +00:00
Aleksandr BogdanovandTony 9d2fc7a676 feat(route/telegram): Fix tglib (#18268)
* refactor telegram/tglib for Hono

* linter fix

* add CSP for channel media

* don't cut feed item title prematurely

* implement shared Geo position attachment

* don't start TG client unless routes are requested

* resolve typescript; fix private chats and groups; fix stickers and no-thumbnail document attachments; fix media-by-link attachments

* fix empty text and message grouping; add GeoLive media type; add Poll/Quiz media type

* add script-src none to CSP

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* add unwrap media for stories support

* fix fwdFrom access

* remove unnecessary core patches, add media route docs

* remove tglib fallback, as it's already preferred if configured

* implement stories endpoint

* improve text representation of channel content

* serve channel media under /channel/entityName/msgId

* improve stories endpoint

* restore original post links to avoid feed duplicates on upgrade

* appease eslint

* fix lint

* improve stories config route definition

* fix poll handling

* lint fix

* format poll results nicely

* fix node compat

* remove duplicate ignore

---------
2025-09-16 21:41:05 +08:00
github-actions[bot] 25f8cd5e63 style: auto format 2025-08-14 02:55:48 +00:00
dependabot[bot] ae3e646ea9 chore(deps-dev): bump eslint-plugin-unicorn from 59.0.1 to 60.0.0 (#19662)
* chore(deps-dev): bump eslint-plugin-unicorn from 59.0.1 to 60.0.0

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-version: 60.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* refactor: replace reverse() with toReversed() for improved readability

* chore: update packageManager version to pnpm@10.13.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-22 20:45:42 +08:00
DIYgod 2dce2e32dd feat: docs sorting and auto popular 2025-05-31 17:10:01 +08:00
Tony a5e2e295dc refactor: fix all get to toArray (#19000)
* refactor: fix all get

* fix(utils/common-config): charset case compare

* Revert "fix(utils/common-config): charset case compare"

This reverts commit 3c1880f2fad53ad2cafddcee7741390fd46fa3d2.

* fix: nga

* fix: notateslaapp

* fix: ps

* fix: xjtu

* fix: enforce error on restricted syntax for get calls

* fix: eslint

* fix: more eslint
2025-05-04 05:24:53 +08:00
Tony 03969f3867 refactor: fix lint issue (#18963)
* fix: unicorn/no-empty-file

* fix: unicorn/prefer-node-protocol

* fix: unicorn/prefer-number-properties

* fix: unicorn/consistent-destructuring

* fix: unicorn/no-array-callback-reference

* fix: unicorn/new-for-builtins

* fix: set checkNaN to false in unicorn/prefer-number-properties

* fix: unicorn/prefer-string-slice

* fix: update eslint ignore
2025-04-29 03:00:16 +08:00
Tony 4b0215d29d fix(route/telegram): fix import style (#18926) 2025-04-23 18:54:26 +08:00
DIYgod 83e701b592 feat: compile ts through tsdown (#18908)
* feat: build ts via tsdown

* feat: exec tsdown

* fix

* fix

* fix

* feat: use tsdown shims

* chore: run rolldown lifecycle script

* fix: use shims

---------
2025-04-22 22:29:11 +08:00
Stephen Zhou cc60fa813b fix(route): first line as title for telegram channel (#18800) 2025-04-08 23:09:21 +08:00
Tony 43eb93acb2 feat(telegram): preview sticker (#18682)
* feat(route): preview sticker

* fix: typo
2025-03-24 23:20:24 +08:00
dependabot[bot]andTony 8a0efc0ba2 chore(deps-dev): bump eslint-plugin-unicorn from 56.0.1 to 57.0.0 (#18392)
* chore(deps-dev): bump eslint-plugin-unicorn from 56.0.1 to 57.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 56.0.1 to 57.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v56.0.1...v57.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: remove unicorn plugin

* style: fix eslint issues

* style: fix more issues

* chore: flat config unicorn

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2025-02-19 05:10:11 +08:00
Tony 04a3e88448 docs: fix admonitions syntax (#18018) 2025-01-01 15:52:40 +08:00
pseudoyu fa1dcc56b5 chore(route): add more popular routes 2024-11-26 12:06:40 +08:00
Tony 566d3d0201 fix(route/telegram): improve typing 2024-11-09 21:07:53 +08:00
Tony 7bec9c51f4 chore(telegram): replace debug with winston 2024-11-09 20:32:42 +08:00
Tony 50533bc758 docs: add back maintainer in #13255 2024-11-09 20:03:35 +08:00
pseudoyu b4fece47ed feat(route/telegram): add mtproxy support for tglib 2024-11-05 12:58:58 +07:00
pseudoyu 56d4c5e4e7 refactor(route/telegram): use log instead of console to resolve eslint issue 2024-11-02 19:38:16 +07:00
pseudoyu 0a42f88de7 feat(route): add lang field in route namespace 2024-11-01 22:09:31 +07:00
pseudoyu b0aba0f05a fix(route/telegram): only use tglib as fallback 2024-11-01 02:22:19 +07:00
pseudoyu 0d3a6dc589 fix(route/telegram): use tglib when no routeParams 2024-11-01 02:18:35 +07:00
pseudoyu 24e8c1e0c8 fix(route/telegram): null username from telegram api 2024-10-28 17:50:42 +07:00
pseudoyu 60f432766b docs(route/telegram): add docs for telegram session 2024-10-27 21:44:47 +07:00
pseudoyu 26bc26a3b8 feat(route/telegram): add telegram session scripts and logics 2024-10-27 21:37:37 +07:00
pseudoyu a19dc7df73 refactor(route/telegram): use ofetch in telegram routes 2024-10-25 17:07:21 +08:00
DIYgod 0a049c1ded docs: more popular items 2024-09-17 16:30:18 +08:00
Rongrong b24beaa2b6 fix(route/telegram/channel): invisible images in albums and Link Preview (#16523)
Some have reported that a recent upgrade of RSSHub broke the
/telegram/channel route, resulting in images from Link Preview (Instant
View) or albums not being displayed, even when showLinkPreview
explicitly or implicitly (by default) enabled.

This is a REGRESSION introduced in
edfaed1b7d.

The patch fixes it.

Signed-off-by: Rongrong <i@rong.moe>
2024-08-24 20:08:22 +08:00
DIYgod edfaed1b7d feat: add width and height to img 2024-08-07 23:07:12 +08:00
DIYgod 703e46de70 feat: add view 2024-07-23 15:14:21 +08:00
DIYgod 9020861509 feat: update examples 2024-07-22 13:24:26 +08:00
equt 9c22718ffb doc(route): fix incorrect MD syntax (#16040) 2024-06-30 10:00:28 +08:00
DIYgod a1322b845d feat: clear popular docs 2024-06-27 03:24:02 +08:00
DIYgod 6ee5d7267b chore: add popular category 2024-05-19 23:00:43 +08:00
Rongrong 1de0c62bdf feat(route/telegram/channel): allow trimming hyperlinks from hashtags (#15535)
Signed-off-by: Rongrong <i@rong.moe>
2024-05-10 03:03:59 +08:00