Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(misc): add eslint-plugin-yml, npm cache #8599

Merged
merged 6 commits into from
Nov 27, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use single quote
  • Loading branch information
TonyRL committed Nov 27, 2021
commit fd1294b2c881728da3a310e235f2e84c7189e65c
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage
.vscode
docker-compose.yml
!/.github
9 changes: 8 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
"no-new-func": 2,
"require-await": 2,
"prefer-arrow-callback": 2,
"object-shorthand": 2
"object-shorthand": 2,
"yml/quotes": [
"error",
{
"prefer": "single"
}
]

}
}
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These are supported funding model platforms
github: DIYgod
patreon: DIYgod
custom: ["https://afdian.net/@diygod", "https://diygod.me/images/zfb.jpg", "https://diygod.me/images/wx.jpg"]
custom: ['https://afdian.net/@diygod', 'https://diygod.me/images/zfb.jpg', 'https://diygod.me/images/wx.jpg']
22 changes: 11 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
directory: '/'
schedule:
interval: daily
time: "21:00"
time: '21:00'
open-pull-requests-limit: 10
reviewers:
- DIYgod
Expand All @@ -13,20 +13,20 @@ updates:
ignore:
- dependency-name: cheerio
versions:
- "> 1.0.0-rc.5"
- '> 1.0.0-rc.5'
- dependency-name: remark
versions:
- "> 12.0.1"
- '> 12.0.1'
- dependency-name: remark
versions:
- "> 13.0.0, < 13.1"
- '> 13.0.0, < 13.1'
- dependency-name: remark-frontmatter
versions:
- "> 2.0.0"
- '> 2.0.0'
- dependency-name: remark-frontmatter
versions:
- ">= 3.0.a, < 3.1"
- dependency-name: "@sentry/node"
- '>= 3.0.a, < 3.1'
- dependency-name: '@sentry/node'
versions:
- 6.0.4
- 6.2.3
Expand All @@ -49,11 +49,11 @@ updates:
- dependency-name: rss-parser
versions:
- 3.11.0
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: daily
time: "21:00"
time: '21:00'
open-pull-requests-limit: 10
reviewers:
- DIYgod
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
paths:
- "lib/**"
- 'lib/**'

jobs:
build:
Expand All @@ -23,7 +23,7 @@ jobs:
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'
- name: build file
run: npm ci && npm run build:all
- name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
uses: ben-z/actions-comment-on-issue@1.0.2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: "👍 感谢提交该 Issue,请确保仔细阅读 [Issue 模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/bug_report_zh.md),[RSS 提案模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/rss_request_zh.md) 或 [Feature 提案模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/feature_request_zh.md) 以便于测试。不符合模板将导致 Issue 被直接关闭。<br /><br />👍 Thanks for the issue, please follow the [Issue template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/bug_report_en.md), [RSS proposal template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/rss_request_zh.md) or [Feature proposal template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/feature_request_en.md). Otherwise the issue will be closed."
message: '👍 感谢提交该 Issue,请确保仔细阅读 [Issue 模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/bug_report_zh.md),[RSS 提案模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/rss_request_zh.md) 或 [Feature 提案模板](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/feature_request_zh.md) 以便于测试。不符合模板将导致 Issue 被直接关闭。<br /><br />👍 Thanks for the issue, please follow the [Issue template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/bug_report_en.md), [RSS proposal template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/rss_request_zh.md) or [Feature proposal template](https://github.com/DIYgod/RSSHub/blob/master/.github/ISSUE_TEMPLATE/feature_request_en.md). Otherwise the issue will be closed.'
10 changes: 5 additions & 5 deletions .github/workflows/docker-release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: "[docker] CI for releases"
name: '[docker] CI for releases'

on:
push:
branches:
- master
paths:
- "lib/**"
- ".github/workflows/**"
- "Dockerfile"
- "package.json"
- 'lib/**'
- '.github/workflows/**'
- 'Dockerfile'
- 'package.json'

jobs:
release:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: "[docker] CI for build tests"
name: '[docker] CI for build tests'

on:
pull_request:
branches:
- master
paths:
- "lib/**"
- "Dockerfile"
- "package.json"
- 'lib/**'
- 'Dockerfile'
- 'package.json'

# Please, always create a pull request instead of push to master.
jobs:
test:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
cache: "npm"
node-version: '14'
cache: 'npm'
- run: yarn install
- run: npm run format
- name: Commit files
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- master
paths:
- "lib/**"
- 'lib/**'

jobs:
build:
Expand All @@ -15,9 +15,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
cache: "npm"
registry-url: "https://registry.npmjs.org"
node-version: '14'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Release
run: |
git config --local user.email "action@github.com"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-deploy-route-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
id: fetchRoute
uses: actions/github-script@v3
with:

# by default, JSON format returned
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
cache: "npm"
node-version: '14'
cache: 'npm'
- run: npm ci
- name: Lint
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:

strategy:
matrix:
node-version: ["14.x"]
node-version: ['14.x']

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache: 'npm'
- run: npm ci
- run: npm run jest
env:
Expand Down
6 changes: 3 additions & 3 deletions scripts/ansible/rsshub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
when: ansible_distribution != 'Ubuntu' or ansible_distribution_version !='20.04'
- name: Install GPG keys for repos
apt_key:
url: "{{ item }}"
url: '{{ item }}'
state: present
with_items:
- https://deb.nodesource.com/gpgkey/nodesource.gpg.key
- https://download.docker.com/linux/ubuntu/gpg
- https://dl.cloudsmith.io/public/caddy/stable/cfg/gpg/gpg.155B6D79CA56EA34.key
- name: Install repos
apt_repository:
repo: "{{ item }}"
repo: '{{ item }}'
state: present
update_cache: yes
with_items:
Expand Down Expand Up @@ -71,7 +71,7 @@
state: started
restart_policy: always
published_ports:
- "3000:3000"
- '3000:3000'
- name: Create the user
user:
name: rsshub
Expand Down