Commit Graph
37 Commits
Author SHA1 Message Date
Tony 8043a5a819 style: update oxlint to use simple-import-sort 2026-03-04 03:13:57 +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
Tony 7785a7bde4 style: update eslint rules (#21207)
* style: update eslint rules

* style: fix prefer-object-spread

* style: fix no-lonely-if

* fix: typescript-eslint/no-unnecessary-template-expression

* fix: sort import

* style: apply file filtering to config presets

* revert: changes on pkg

* style: revert

* style: use defineConfig

* style: reorder js plugin in eslint config

* chore: remove obsolete override

* style: fix CodeQL initialization to ensure language matrix is used
2026-02-23 08:17:37 +08:00
dependabot[bot] bf657d46b1 chore(deps-dev): bump eslint-plugin-yml from 1.19.1 to 3.0.0 (#20928)
* chore(deps-dev): bump eslint-plugin-yml from 1.19.1 to 3.0.0

Bumps [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) from 1.19.1 to 3.0.0.
- [Release notes](https://github.com/ota-meshi/eslint-plugin-yml/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-yml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-yml/compare/v1.19.1...v3.0.0)

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

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

* style(eslint): update eslint-plugin-yml config

* fix(eslint): exclude pnpm-lock.yaml from YAML linting rules

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-01 00:43:46 +08:00
dependabot[bot] 5c744e03d9 chore(deps-dev): bump yaml-eslint-parser from 1.3.2 to 2.0.0 (#20927)
* chore(deps-dev): bump yaml-eslint-parser from 1.3.2 to 2.0.0

Bumps [yaml-eslint-parser](https://github.com/ota-meshi/yaml-eslint-parser) from 1.3.2 to 2.0.0.
- [Release notes](https://github.com/ota-meshi/yaml-eslint-parser/releases)
- [Changelog](https://github.com/ota-meshi/yaml-eslint-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/yaml-eslint-parser/compare/v1.3.2...v2.0.0)

---
updated-dependencies:
- dependency-name: yaml-eslint-parser
  dependency-version: 2.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* chore(deps-dev): update yaml-eslint-parser import to use namespace

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-31 22:47:42 +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
Stephen Zhou be83ac8be4 chore: fix prettier config 2025-11-27 14:32:29 +08:00
Stephen Zhou 95eb1ba802 chore: lint consistent-type-specifier-style 2025-11-27 13:45:51 +08:00
Stephen Zhou 778300911e build: introduce lint plugin for import consistency (#20579)
* build: introduce import sort plugin for consistency

* update

* update

* update
2025-11-27 10:52:00 +08:00
Stephen Zhou b4a2aa5e70 fix(core): package mode (#20580) 2025-11-26 20:44:18 +08:00
dependabot[bot] c38e75a28a chore(deps): bump http-cookie-agent from 7.0.2 to 7.0.3 (#20495)
* chore(deps): bump http-cookie-agent from 7.0.2 to 7.0.3

Bumps [http-cookie-agent](https://github.com/3846masa/http-cookie-agent) from 7.0.2 to 7.0.3.
- [Release notes](https://github.com/3846masa/http-cookie-agent/releases)
- [Changelog](https://github.com/3846masa/http-cookie-agent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/3846masa/http-cookie-agent/compare/v7.0.2...v7.0.3)

---
updated-dependencies:
- dependency-name: http-cookie-agent
  dependency-version: 7.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* chore(deps): update dependencies for @hono/zod-openapi, tough-cookie, and zod

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 22:08:12 +08:00
Tony e3c18adc71 chore: bump to node 24 (#20486) 2025-11-15 03:56:04 +08:00
Tony daf9460e6a fix(router/twitter): replace zstd decoder with native zlib decompression (#20485)
* fix(twitter): replace zstd decoder with native zlib decompression

* fix(twitter): update node version compatibility and enable experimental features
2025-11-15 01:56:23 +08:00
Tony 53449edfaa style(eslint): update no-unused-vars args option to 'after-used' 2025-11-04 21:03:01 +08:00
Tony 6769806007 style(eslint): update no-unused-vars ignore pattern 2025-11-04 20:50:23 +08:00
Tony 016ea35ac1 chore(eslint): ensure proper error handling 2025-09-30 11:06:17 +08:00
Tony fff0cb0545 chore(eslint): ensure proper error handling 2025-09-30 01:23:32 +08:00
Tony 3a8465a422 chore(eslint): ensure proper error handling 2025-09-30 01:12:04 +08:00
Stephen Zhou add932bf38 feat: more nsfw flag (#20184)
* feat: add more nsfw flag

* update
2025-09-29 17:41:45 +08:00
Tony 8622f69958 chore(eslint): ensure proper error handling 2025-09-21 23:18:48 +08:00
Tony a59a561a72 chore(eslint): update Node.js built-ins rule version to >=22.16.0 2025-09-15 21:17:23 +08:00
Tony 690cd711c9 chore(eslint): add rule for unsupported Node.js built-ins 2025-09-15 21:10:42 +08:00
dependabot[bot] 802cbf95d2 chore(deps-dev): bump eslint-plugin-unicorn from 60.0.0 to 61.0.2 (#19998)
* chore(deps-dev): bump eslint-plugin-unicorn from 60.0.0 to 61.0.1

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 60.0.0 to 61.0.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v60.0.0...v61.0.1)

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

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

* refactor: replace `replace(/regex/g)` with replaceAll

* refactor: replace sort() with toSorted() for immutability in various routes and utilities

* refactor: fix unicorn/prefer-array-find

* refactor: fix unicorn/prefer-at

* refactor: add unicorn/no-array-sort rule to ESLint configuration

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-08 23:03:48 +08:00
Stephen Zhou 4e8c8fb27a fix(route/youtube): cache getSubtitles (#19811)
* fix(route/youtube): cache getSubtitles

* fix null description
2025-08-14 10:53:41 +08:00
DIYgod b95bb570fb chore: update build script and remove unused Vercel configuration
- Modified the build script in package.json to rename the output file from server.js to index.js.
- Removed the vercel.json configuration file as it is no longer needed.
- Updated ESLint configuration to reflect changes in file references.
2025-08-10 23:00:37 +08:00
Tony 857d5989c1 feat(utils/puppeteer): replace puppeteer-extra-plugin-stealth with rebrowser (#19506)
* feat: use rebrowser

* fix: remove rebrowser-puppeteer-core

* fix: chrome not found

* fix: replace remove-infobar with disable-blink-features

remove-infobar was removed since M76 https://github.com/puppeteer/puppeteer/issues/1765

* feat: remove outdated stealth plugin

* fix: remove puppeteer non stealth test
2025-07-01 04:38:05 +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
dependabot[bot] 5a824d3367 chore(deps-dev): bump eslint-plugin-unicorn from 58.0.0 to 59.0.0 (#18957)
* chore(deps-dev): bump eslint-plugin-unicorn from 58.0.0 to 59.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 58.0.0 to 59.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v58.0.0...v59.0.0)

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

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

* fix: no-unnecessary-array-flat-depth

* fix(eslint): unicorn/prefer-import-meta-properties

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-28 21:50: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
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 3759def1d1 chore(eslint): add unicorn recommended config to ESLint configuration 2025-02-19 00:01:03 +08:00
Tony 8d76a0055d style(eslint): update no-restricted-syntax (#17215) 2024-10-20 20:41:31 -07:00
dependabot[bot] 54bd7e7705 chore(deps-dev): bump eslint-plugin-unicorn from 55.0.0 to 56.0.0 (#17000)
* chore(deps-dev): bump eslint-plugin-unicorn from 55.0.0 to 56.0.0

Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 55.0.0 to 56.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v55.0.0...v56.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: fix pnpm install

* style(eslint): ignore `prefer-global-this` for puppeteer

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 21:14:37 +08:00
Tony 665124e0d3 chore: update lint config 2024-08-12 21:18:14 +08:00
Tony 06a6db7ff7 chore: update ESLint rule
use explicit 'toArray' over the vague 'get'
2024-07-11 02:14:38 +08:00
Stephen Zhou 0126dbc153 chore: update eslint (#16094)
* chore: update eslint

* chore: install yaml-eslint-parser

* chore: fix lint

* Trigger ci

* chore: set error level to string

* chore: pin deps

---------
2024-07-06 03:45:10 +08:00