Commit Graph

50 Commits

Author SHA1 Message Date
Tony 267eb1e615
docs: add back route metadata for unknown routes (#22865)
* fix: add back route metadata

* fix: update route handlers to use ctx.req.param for path retrieval

* fix: add back route metadata for tsx

* fix: remove unnecessary reposition

* fix: remove * path

* docs: fix route name

* fix: radar url

* fix: more maintainers

* fix: typo

* fix: last batch of empty maintainers

* feat!: remove biodiscover

* fix: correct eslint directive in data258 route
2026-07-29 09:25:19 +08:00
dependabot[bot] 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] 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] 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 75d43dd086
chore: add eslint-plugin-regexp (#22189)
* chore: add eslint-plugin-regexp

* chore: autofix

* chore: fix no-useless-flag

* chore: fix optimal-lookaround-quantifier

* chore: fix no-lazy-ends

* chore: fix no-contradiction-with-assertion

* chore: fix no-useless-assertions

* chore: fix no-useless-quantifier

* chore: fix remaining regexp issues

* fix: regex for WFU news link validation
2026-06-05 20:04:39 +08:00
github-actions[bot] ebfe021b50 style: auto format 2026-04-14 15:15:05 +00:00
github-actions[bot] 6e134d32d5 style: auto format 2026-03-25 10:35:56 +00:00
Tony 79a525cbd3 refactor: add GraphQL annotation to queries for auto formatting in oxfmt v0.42
0fe46fe333
2026-03-25 18:34:13 +08:00
Tony b84bb92a8a
style: replace unicorn/no-for-loop w/ typescript/prefer-for-of (#20798)
* style: replace unicorn/no-for-loop w/ typescript/prefer-for-of

* style: fix typescript-eslint/prefer-for-of

* style: fix typescript/no-inferrable-types

* style: fix typescript-eslint/consistent-generic-constructors

* style: typescript-eslint/consistent-type-assertions

* style: fix typescript-eslint/array-type

* fix: revert .entries() in d96ca62d3d80806b0475a54e749decfc07b24701
2026-01-02 09:42:24 +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] a28890a135 style: auto format 2025-11-27 02:55:46 +00: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
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
pseudoyu 0a42f88de7
feat(route): add lang field in route namespace 2024-11-01 22:09:31 +07:00
Nya Candy cce3bdb4fe
fix(route): 使用 ofetch() 替换一些 got().json() (#15780)
* chore: some massive adoption from got().json() to ofetch()

Not sure if everything works fine (some may still have problems other than fakeGot & json issues), but this might have some help.

BTW maybe we can start "The Migration" project to update some outdated routes to new format 🤔

* fix: some other issues

* fix: query

* fix: luogu user blog & modb topic

* fix: modb topic response

* fix: query options in freebuf

---------
2024-06-01 01:10:15 +08:00
Tony 0893debb07
style(eslint): lint tsx (#15098) 2024-04-04 20:28:45 +08:00
Tony d585a87daf
fix: allow multiple radar rules per route (#14800)
* fix: allow multiple radar rules per route

* fix: github folder

* feat: add namespace to radar target

* docs: fix types url
2024-03-16 03:28:44 +08:00
DIYgod d83c85a349
feat: remove radar.ts maintainer.ts router.ts 2024-03-09 18:31:48 +08:00
DIYgod 33e2f17055
fix: wrong categories 2024-03-09 15:08:34 +08:00
DIYgod 76e7e8296b
fix: add routes 2024-03-09 03:24:53 +08:00
DIYgod 45f9ea21fb
feat: add routes 2024-03-09 03:06:53 +08:00
DIYgod f8b141ee6e
feat: add namespace.ts 2024-03-09 01:53:22 +08:00
DIYgod 44c9853541
feat: replace require with import 7/n 2024-03-07 01:17:21 +08:00
Yufan You 130b11224e
chore: remove @ts-nocheck (#14669) 2024-03-05 21:06:03 +08:00
DIYgod d93a301d97
feat: build-radar.ts 2024-03-04 01:52:04 +08:00
DIYgod 2c7d7f9205
feat: build-maintainer.ts 2024-03-04 01:38:38 +08:00
DIYgod a10bafb263
fix: __dirname 2024-03-04 00:46:26 +08:00
DIYgod 8065ededf5
feat: rename routes .js to .ts 2024-03-04 00:35:37 +08:00
DIYgod df57bb5d50
feat: esm standard for routes 2024-03-02 03:25:26 +08:00
DIYgod 6f57c02538
feat: rename routes dir - 2/2 2024-03-01 01:24:49 +08:00
DIYgod f1a9223aac
feat: remove notOperational routes - programming 2023-12-20 00:01:03 +08:00
Tony 03ff28996d feat(radar): leetcode radar 2022-08-05 12:49:21 +00:00
Daniel Li (李丹阳) d77a039f05
style(eslint): add no-implicit-coercion rule (#8175)
* refactor: add no-implicit-coercion rule for ESLint

* fix: errors from deepscan

* fix: errors from deepscan

* fix: errors from deepscan

* fix: errors from deepscan

* fix: errors from deepscan

* Update docs/en/joinus/quick-start.md

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update docs/joinus/quick-start.md

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update lib/routes/av01/tag.js

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update lib/routes/gov/taiwan/mnd.js

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update lib/routes/ps/product.js

Co-authored-by: Sukka <isukkaw@gmail.com>

* refactor: minify html string

Co-authored-by: Sukka <isukkaw@gmail.com>
2021-09-15 21:22:11 +08:00
Sukka d82847f541
style/chore(eslint): enforce new rules (#8040)
* style: prefer object shorthand syntax
* refactor: prefer Array#map over Array#forEach
* style: prefer arrow callback
* chore(eslint): update rules
* style: auto fix by eslint
2021-08-17 22:23:23 +08:00
Sukka 6e3b58ed1d
refactor: avoid promise overhead (#8028) 2021-08-16 11:45:53 -07:00
Joey Chai 052652f2f4
fix: leetcode articles (#6319) 2020-12-04 15:53:13 +00:00
DIYgod 0e7b14e718
chore(deps-dev): bump prettier from 1.19.1 to 2.0.2 2020-04-02 21:21:46 +08:00
DIYgod 9a3bea3525
feat: remove referrerpolicy in routes 2019-08-28 14:38:19 +08:00
DIYgod a34b9ae542
feat: remove addNoReferrer 2019-08-28 14:33:05 +08:00
Cloud 842cbe1510 fix: leetcode article image path (#2823) 2019-08-11 01:14:57 +08:00
Nathan 9b16216e7e fix:Leetcode打卡时间的的问题 (#2425) 2019-06-18 16:02:14 +08:00
Nathan 96b1c47987 fix: leetcode pubDate 的不正确 fix leetcode 打卡文档 (#2397) 2019-06-13 15:25:07 +08:00
Nathan bf2bf85b8f feat :通过leetcode-cn接口重写了力扣中国 (#2385) 2019-06-13 11:31:51 +08:00
Nathan 983bb09c57 fix: 力扣 (#2340) 2019-06-08 13:49:48 +08:00
DIYgod a56c0b5a39
refactor: rename axios to got 2019-06-03 18:03:05 +08:00
Nathan 62da8c834d feat: add查看LeetCode打卡的功能 (#2219) 2019-05-24 17:56:56 +08:00
DIYgod e2badbfa98
chore: module alias for all routes 2019-05-15 15:27:15 +08:00
DIYgod a0333fbd7e
feat: use contentExpire 2019-05-09 01:23:29 +08:00
Henry Wang db474c726f fix: filter out paid articles (#1659)
fix #1658
2019-03-04 19:04:33 +08:00
Chenyang Shi 6f0a80fcd4 add leetcode articles (#1574) 2019-02-19 12:00:19 +08:00