Skip to content

Commit

Permalink
Merge pull request #1321 from DIYgod/master
Browse files Browse the repository at this point in the history
  • Loading branch information
axelburks authored Mar 19, 2024
2 parents a1766f4 + c14fb79 commit fbef408
Show file tree
Hide file tree
Showing 10,243 changed files with 233,271 additions and 253,037 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@

"onCreateCommand": "sudo apt-get update && export DEBIAN_FRONTEND=noninteractive && sudo apt-get -y install --no-install-recommends ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 wget xdg-utils redis-server && sudo apt-get autoremove -y && sudo apt-get clean -y && sudo rm -rf /var/lib/apt/lists/*",

"updateContentCommand": "pnpm i && pnpm i -C website && pnpm rb",
"updateContentCommand": "pnpm i && pnpm rb",

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pnpm i && pnpm i -C website && pnpm rb",
"postCreateCommand": "pnpm i && pnpm rb",

// Disable auto start dev env since codespaces sometimes fails to attach to the terminal
// "postAttachCommand": {
Expand Down
10 changes: 3 additions & 7 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ Dockerfile*
LICENSE
Procfile
app-minimal
assets
coverage
docs
node_modules
test

Expand All @@ -35,13 +33,11 @@ process.json
package-lock.json
vercel.json

#git but keep the git commit hash
# git but keep the git commit hash
.git/logs
.git/objects
.git/index
.git/info
.git/hooks

#rsshub auxiliary files
lib/radar-rules.js
lib/v2/**/radar.js
# rsshub auxiliary files
lib/routes/**/radar.js
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ coverage
docker-compose.yml
!/.github
!/docs/.vuepress
website
136 changes: 79 additions & 57 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,37 @@
{
"extends": ["eslint:recommended", "plugin:n/recommended", "plugin:prettier/recommended", "plugin:yml/recommended"],
"plugins": ["prettier", "@stylistic/js"],
"extends": ["eslint:recommended", "plugin:n/recommended", "plugin:unicorn/recommended", "plugin:prettier/recommended", "plugin:yml/recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"root": true,
"plugins": ["prettier", "@stylistic", "unicorn", "@typescript-eslint"],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"env": {
"node": true,
"es6": true,
"es2024": true,
"browser": true
},
"rules": {
// possible problems
"array-callback-return": 2,
"array-callback-return": ["error", { "allowImplicit": true }],
"no-await-in-loop": 2,
"no-control-regex": 0,
"no-duplicate-imports": 2,
"no-prototype-builtins": 0,
"no-unsafe-negation": 2,
"require-atomic-updates": 0,
// suggestions
"arrow-body-style": 2,
"block-scoped-var": 2,
"curly": 2,
"dot-notation": 2,
"eqeqeq": 2,
"default-case": ["warn", { "commentPattern": "^no default$" }],
"default-case-last": 2,
"no-console": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-label": 2,
"no-global-assign": 2,
"no-implicit-coercion": [
"error",
{
"boolean": false,
"number": false,
"string": false,
"disallowTemplateShorthand": true
}
],
"no-implicit-coercion": ["error", { "boolean": false, "number": false, "string": false, "disallowTemplateShorthand": true }],
"no-implicit-globals": 2,
"no-labels": 2,
"no-multi-str": 2,
Expand All @@ -52,62 +45,91 @@
"object-shorthand": 2,
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-regex-literals": 1,
"prefer-object-has-own": 2,
"no-useless-escape": 1,
"prefer-regex-literals": ["error", { "disallowRedundantWrapping": true }],
"require-await": 2,
// typescript
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
// plugin specific
// previous eslint formatting rules
"@stylistic/js/arrow-parens": 2,
"@stylistic/js/arrow-spacing": 2,
"@stylistic/js/comma-spacing": 2,
"@stylistic/js/comma-style": 2,
"@stylistic/js/function-call-spacing": 2,
"@stylistic/js/keyword-spacing": 2,
"@stylistic/js/linebreak-style": 2,
"@stylistic/js/lines-around-comment": ["error", { "beforeBlockComment": false }],
"@stylistic/js/no-multiple-empty-lines": 2,
"@stylistic/js/no-trailing-spaces": 2,
"@stylistic/js/rest-spread-spacing": 2,
"@stylistic/js/semi": 2,
"@stylistic/js/space-before-blocks": 2,
"@stylistic/js/space-in-parens": 2,
"@stylistic/js/space-infix-ops": 2,
"@stylistic/js/space-unary-ops": 2,
"@stylistic/js/spaced-comment": 2,
// https://github.com/eslint-community/eslint-plugin-n
"n/no-extraneous-require": [
"error",
"unicorn/consistent-destructuring": 1,
"unicorn/consistent-function-scoping": 1,
"unicorn/explicit-length-check": 0,
"unicorn/filename-case": ["error", { "case": "kebabCase", "ignore": [".*\\.(yaml|yml)$", "RequestInProgress\\.js$"] }],
"unicorn/new-for-builtins": 0,
"unicorn/no-array-callback-reference": 0,
"unicorn/no-array-reduce": 1,
"unicorn/no-await-expression-member": 0,
"unicorn/no-empty-file": 1,
"unicorn/no-hex-escape": 1,
"unicorn/no-null": 0,
"unicorn/no-object-as-default-parameter": 1,
"unicorn/no-process-exit": 0,
"unicorn/no-useless-switch-case": 0,
"unicorn/no-useless-undefined": ["error", { "checkArguments": false }],
"unicorn/numeric-separators-style": [
"warn",
{
"allowModules": ["puppeteer-extra-plugin-user-preferences", "puppeteer-extra-plugin-user-data-dir"]
"onlyIfContainsSeparator": false,
"number": { "minimumDigits": 7, "groupLength": 3 },
"binary": { "minimumDigits": 9, "groupLength": 4 },
"octal": { "minimumDigits": 9, "groupLength": 4 },
"hexadecimal": { "minimumDigits": 5, "groupLength": 2 }
}
],
"unicorn/prefer-code-point": 1,
"unicorn/prefer-logical-operator-over-ternary": 1,
"unicorn/prefer-module": 0,
"unicorn/prefer-node-protocol": 0,
"unicorn/prefer-number-properties": ["warn", { "checkInfinity": false }],
"unicorn/prefer-object-from-entries": 1,
"unicorn/prefer-regexp-test": 1,
"unicorn/prefer-spread": 1,
"unicorn/prefer-string-replace-all": 1,
"unicorn/prefer-string-slice": 0,
"unicorn/prefer-switch": ["warn", { "emptyDefaultCase": "do-nothing-comment" }],
"unicorn/prefer-top-level-await": 0,
"unicorn/prevent-abbreviations": 0,
"unicorn/switch-case-braces": ["error", "avoid"],
"unicorn/text-encoding-identifier-case": 0,
// previous eslint formatting rules
"@stylistic/arrow-parens": 2,
"@stylistic/arrow-spacing": 2,
"@stylistic/comma-spacing": 2,
"@stylistic/comma-style": 2,
"@stylistic/function-call-spacing": 2,
"@stylistic/keyword-spacing": 2,
"@stylistic/linebreak-style": 2,
"@stylistic/lines-around-comment": ["error", { "beforeBlockComment": false }],
"@stylistic/no-multiple-empty-lines": 2,
"@stylistic/no-trailing-spaces": 2,
"@stylistic/rest-spread-spacing": 2,
"@stylistic/semi": 2,
"@stylistic/space-before-blocks": 2,
"@stylistic/space-in-parens": 2,
"@stylistic/space-infix-ops": 2,
"@stylistic/space-unary-ops": 2,
"@stylistic/spaced-comment": 2,
// https://github.com/eslint-community/eslint-plugin-n
"n/no-extraneous-require": ["error", { "allowModules": ["puppeteer-extra-plugin-user-preferences", "puppeteer-extra-plugin-user-data-dir"] }],
"n/no-deprecated-api": 1,
"n/no-missing-import": 0,
"n/no-missing-require": 0,
"n/no-process-exit": 0,
"n/no-unpublished-require": [
"error",
{
"allowModules": ["tosource"]
}
],
"n/no-unpublished-import": 0,
"n/no-unpublished-require": ["error", { "allowModules": ["tosource"] }],
"prettier/prettier": 0,
"yml/quotes": [
"error",
{
"prefer": "single"
}
]
"yml/quotes": ["error", { "prefer": "single" }],
"yml/no-empty-mapping-value": 0
},
"overrides": [
{
"files": ["*.yaml", "*.yml"],
"parser": "yaml-eslint-parser",
"rules": {
"lines-around-comment": [
"error",
{
"beforeBlockComment": false
}
]
"lines-around-comment": ["error", { "beforeBlockComment": false }]
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# These are supported funding model platforms
github: DIYgod
open_collective: RSSHub
patreon: DIYgod
custom: ['https://afdian.net/@diygod', 'https://archive.diygod.me/images/zfb.jpg', 'https://archive.diygod.me/images/wx.jpg']
open_collective: RSSHub
custom: ['https://afdian.net/a/diygod', 'https://docs.rsshub.app/support']
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/rss_request_en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🍰 RSS Proposal
name: 🧡 RSS Proposal
description: Submit a new RSS proposal
labels: ['RSS proposal']

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/rss_request_zh.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🍰 RSS 提案
name: 🧡 RSS 提案
description: 提交新的 RSS 提案
labels: ['RSS proposal']

Expand Down
7 changes: 2 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Fail to comply will result in your pull request being closed automatically.
请在 `routes` 区域填写以 / 开头的完整路由地址,否则你的 PR 将会被无条件关闭。
如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出。
```route
```routes
/some/route
/some/other/route
/dont/use/this/or/modify/it
Expand All @@ -32,10 +32,7 @@ If your changes are not related to route, please fill in `routes` section with `
## New RSS Route Checklist / 新 RSS 路由检查表

- [ ] New Route / 新的路由
- [ ] Follows [v2 Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [v2 路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard)
- [ ] Documentation / 文档说明
- [ ] Full text / 全文获取
- [ ] Use cache / 使用缓存
- [ ] Follows [Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard)
- [ ] Anti-bot or rate limit / 反爬/频率限制
- [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
- [ ] [Date and time](https://docs.rsshub.app/joinus/advanced/pub-date) / [日期和时间](https://docs.rsshub.app/zh/joinus/advanced/pub-date)
Expand Down
31 changes: 6 additions & 25 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,20 @@ updates:
labels:
- dependencies
ignore:
# ESM only packages
- dependency-name: fanfou-sdk
versions: ['>=5.0.0']
- dependency-name: jsrsasign
versions: ['>=11.0.0'] # no longer includes KJUR.crypto.Cipher for RSA
# ESM only packages
- dependency-name: got
versions: ['>=12.0.0']
- dependency-name: ip-regex
versions: ['>=5.0.0']
- dependency-name: query-string
versions: ['>=8.0.0']
- dependency-name: rand-user-agent
versions: ['>=2.0.1']
- dependency-name: remark-parse
versions: ['>=10.0.0']
- dependency-name: remark-preset-prettier
versions: ['>=1.0.0']
- dependency-name: unified
versions: ['>=10.0.0']
# remark-custom-heading-id is not updated to
# the latest mdast/mdxast which is released from
# the second half of 2023
# remark-custom-heading-id is not updated to
# the latest mdast/mdxast which is released from
# the second half of 2023
- dependency-name: remark
versions: ['>=15.0.0']
- dependency-name: remark-frontmatter
Expand All @@ -42,19 +36,6 @@ updates:
- dependency-name: unist-util-visit-parents
versions: ['>=6.0.0']

- package-ecosystem: npm
directory: '/website'
schedule:
interval: daily
time: '21:00'
open-pull-requests-limit: 10
labels:
- dependencies
groups:
docusaurus:
patterns:
- '@docusaurus/*'

- package-ecosystem: 'github-actions'
directory: '/'
schedule:
Expand Down
12 changes: 6 additions & 6 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
'Route: v1':
'Route: deprecated':
- changed-files:
- any-glob-to-any-file: ['lib/router.js']
- all-globs-to-any-file: ['lib/routes/**/*.js', '!lib/routes/index.js']
- all-globs-to-any-file: ['lib/routes-deprecated/**/*.js', '!lib/routes-deprecated/index.js']

'Route: v2':
'Route':
- changed-files:
- any-glob-to-any-file: ['lib/v2/**/*.js']
- any-glob-to-any-file: ['lib/routes/**/*.ts']

core enhancement:
- changed-files:
- any-glob-to-any-file: ['lib/routes/index.js']
- all-globs-to-any-file: ['lib/**', '!lib/radar-rules.js', '!/lib/config.js', '!lib/router.js', '!lib/routes/**', '!lib/v2/**']
- any-glob-to-any-file: ['lib/routes/index.ts']
- all-globs-to-any-file: ['lib/**', '!lib/config.ts', '!lib/router.js', '!lib/routes/**', '!lib/routes-deprecated/**']

dependencies:
- changed-files:
Expand Down
Loading

0 comments on commit fbef408

Please sign in to comment.