Skip to content

Commit f72a281

Browse files
wh131462thinkasanySmallTeddyhyfree
authored
feat: lc -a and lf and store all question (#67)
* feat(update): check update when first run lc and will be not allow until one day * fix: fix the hidden check update * docs: instead of incorrect symble * chore: remove unsless code (#45) * docs: add contributors markdown * ci(release): modify ci to release when tag add and change the release-it to create new branch * feat(update): check update when first run lc and will be not allow until one day * chore(release): set new branch by correct command * docs: update QRCode (#39) * docs: simplified doc * chore: release v1.0.9-0 * fix: fix the hidden check update * chore: remove unsless code --------- Co-authored-by: thinkasany <480968828@qq.com> * docs: simplifying the npm install command (#44) * ci(test): update file name (#46) * docs: add ci and npm badge (#47) * ci: update name (#48) * chore(pre-commit): modify command (#49) * feat: add get question tag type api * fix: finder error * feat(update): check update when first run lc and will be not allow until one day * fix: fix the hidden check update * feat: add getAllQuestion api * feat: add all question store * feat: add lc all option * fix: allQuestion controller * fix: allQuestion realm data structure * chore: fix update error info * chore: finish lc -a and store get set question by all question store * fix: delete the list of irrelevant questions from the front end * feat: get 'jsonExampleTestcases', 'exampleTestcases' * chore: change jsdoc for function * fix(lk): fix the lk in specified directory fix #61 * chore: prettier add print width * fix(lc): fix the process to handle the question has no enough data fix #60 * perf(allquestion): modify the controller to get/set preferly fix #63 * feat lf command select mode (#65) * feat: add lf select mode --------- Co-authored-by: thinkasany <480968828@qq.com> Co-authored-by: SmallTeddy <zhangzeming1212@gmail.com> Co-authored-by: SmallTeddy <61453917+SmallTeddy@users.noreply.github.com> Co-authored-by: hyfree-msi <wangxianqiangcn@foxmail.com>
1 parent 3f0714d commit f72a281

File tree

124 files changed

+2869
-2799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+2869
-2799
lines changed

.commitlintrc.cjs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ['@commitlint/config-conventional']
3-
}
2+
extends: ['@commitlint/config-conventional']
3+
};

.eslintrc.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
module.exports = {
2-
env: {
3-
browser: true,
4-
commonjs: true,
5-
es2021: true
6-
},
7-
extends: '@antfu',
8-
overrides: [
9-
{
10-
env: {
11-
node: true
12-
},
13-
files: ['.eslintrc.{js,cjs}'],
14-
parserOptions: {
15-
sourceType: 'script'
16-
}
17-
}
18-
],
19-
parserOptions: {
20-
ecmaVersion: 'latest'
21-
},
22-
rules: {}
23-
}
2+
env: {
3+
browser: true,
4+
commonjs: true,
5+
es2021: true
6+
},
7+
extends: '@antfu',
8+
overrides: [
9+
{
10+
env: {
11+
node: true
12+
},
13+
files: ['.eslintrc.{js,cjs}'],
14+
parserOptions: {
15+
sourceType: 'script'
16+
}
17+
}
18+
],
19+
parserOptions: {
20+
ecmaVersion: 'latest'
21+
},
22+
rules: {}
23+
};

.github/dependabot.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: npm # See documentation for possible values
9-
directory: / # Location of package manifests
10-
schedule:
11-
interval: weekly
8+
- package-ecosystem: npm # See documentation for possible values
9+
directory: / # Location of package manifests
10+
schedule:
11+
interval: weekly

.github/workflows/ci.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ name: ci
33
on: [push, pull_request]
44

55
jobs:
6-
ci:
7-
runs-on: ubuntu-latest
6+
ci:
7+
runs-on: ubuntu-latest
88

9-
steps:
10-
- uses: actions/checkout@v3
9+
steps:
10+
- uses: actions/checkout@v3
1111

12-
- name: Use Node.js 20.x
13-
uses: actions/setup-node@v3
14-
with:
15-
node-version: 20.x
12+
- name: Use Node.js 20.x
13+
uses: actions/setup-node@v3
14+
with:
15+
node-version: 20.x
1616

17-
- name: ci
18-
run: |
19-
npm install
20-
npm run test
17+
- name: ci
18+
run: |
19+
npm install
20+
npm run test

.github/workflows/contributors.yml

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
name: gen-org-contributors
22

33
on:
4-
schedule:
5-
- cron: '0 0 * * *'
6-
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
77

88
jobs:
9-
generate:
10-
runs-on: ubuntu-latest
11-
if: github.repository == 'EternalHeartTeam/leetcode-practice'
12-
steps:
13-
- uses: thinkasany/organize-contributors@master
14-
with:
15-
organize_name: EternalHeartTeam
16-
github_token: ${{ secrets.ACTION_TOKEN }}
17-
png_path: images/contributors.png
18-
json_path: contributors.json
19-
branch: svg
20-
commit_message: 'chore: update contributors'
21-
excludes_list: 'ImgBotApp,github-actions[bot],actions-user,imgbot[bot],dependabot[bot]'
9+
generate:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'EternalHeartTeam/leetcode-practice'
12+
steps:
13+
- uses: thinkasany/organize-contributors@master
14+
with:
15+
organize_name: EternalHeartTeam
16+
github_token: ${{ secrets.ACTION_TOKEN }}
17+
png_path: images/contributors.png
18+
json_path: contributors.json
19+
branch: svg
20+
commit_message: 'chore: update contributors'
21+
excludes_list: 'ImgBotApp,github-actions[bot],actions-user,imgbot[bot],dependabot[bot]'

.github/workflows/pr-add-label.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
name: pr-add-label
22

33
on:
4-
pull_request_target:
5-
types: [opened, edited, reopened, synchronize]
4+
pull_request_target:
5+
types: [opened, edited, reopened, synchronize]
66

77
jobs:
8-
add-label:
9-
permissions:
10-
contents: read
11-
pull-requests: write
12-
runs-on: ubuntu-latest
13-
steps:
14-
- name: Check PR number
15-
id: pr_number
16-
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
8+
add-label:
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check PR number
15+
id: pr_number
16+
run: echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
1717

18-
- name: Run add-label Action
19-
uses: thinkasany/pr-label-action@master
20-
with:
21-
github_token: ${{ secrets.ACTION_TOKEN }}
22-
pr_number: ${{ env.PR_NUMBER }}
23-
organize_name: EternalHeartTeam
24-
team_name: eternalheartteam
18+
- name: Run add-label Action
19+
uses: thinkasany/pr-label-action@master
20+
with:
21+
github_token: ${{ secrets.ACTION_TOKEN }}
22+
pr_number: ${{ env.PR_NUMBER }}
23+
organize_name: EternalHeartTeam
24+
team_name: eternalheartteam

.github/workflows/release-cli.yml

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Create Cli Release
22

33
on:
4-
push:
5-
tags:
6-
- 'cli-v*'
4+
push:
5+
tags:
6+
- 'cli-v*'
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
if: github.repository == 'EternalHeartTeam/leetcode-practice'
12-
steps:
13-
- uses: actions/checkout@v3
14-
# Setup .npmrc file to publish to npm
15-
- uses: actions/setup-node@v3
16-
with:
17-
node-version: '20'
18-
registry-url: 'https://registry.npmjs.org'
19-
- run: npm install
20-
- run: npm run build-cli
21-
- run: npm run publish-cli
22-
env:
23-
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
9+
build:
10+
runs-on: ubuntu-latest
11+
if: github.repository == 'EternalHeartTeam/leetcode-practice'
12+
steps:
13+
- uses: actions/checkout@v3
14+
# Setup .npmrc file to publish to npm
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: '20'
18+
registry-url: 'https://registry.npmjs.org'
19+
- run: npm install
20+
- run: npm run build-cli
21+
- run: npm run publish-cli
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.prettierrc

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{
2-
"printWidth": 80,
3-
"tabWidth": 2,
4-
"useTabs": false,
5-
"singleQuote": true,
6-
"semi": false,
7-
"trailingComma": "none",
8-
"bracketSpacing": true
2+
"singleQuote": true,
3+
"semi": true,
4+
"tabWidth": 4,
5+
"trailingComma": "none",
6+
"printWidth": 360,
7+
"quoteProps": "consistent",
8+
"bracketSpacing": true,
9+
"bracketSameLine": true,
10+
"arrowParens": "always",
11+
"htmlWhitespaceSensitivity": "css",
12+
"endOfLine": "lf",
13+
"singleAttributePerLine": true
914
}

.release-it.json

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
{
2-
"github": {
3-
"release": true,
4-
"web": true,
5-
"autoGenerate": true
6-
},
7-
"git": {
8-
"commitMessage": "chore: release v${version}",
9-
"tagName": "cli-v${version}",
10-
"tag": true,
11-
"push": true,
12-
"pushArgs": ["--follow-tags"]
13-
},
14-
"npm": {
15-
"publish": false
16-
},
17-
"hooks": {
18-
"before:release": "prettier --write CHANGELOG.md && git add CHANGELOG.md ",
19-
"after:release": "git checkout master && git push origin master:stable-v${version} || true && echo 更新版本 ${version} 成功!"
20-
},
21-
"plugins": {
22-
"@release-it/bumper": {
23-
"preset": "angular"
2+
"github": {
3+
"release": true,
4+
"web": true,
5+
"autoGenerate": true
246
},
25-
"@release-it/conventional-changelog": {
26-
"preset": "angular",
27-
"infile": "CHANGELOG.md",
28-
"ignoreRecommendedBump": true
7+
"git": {
8+
"commitMessage": "chore: release v${version}",
9+
"tagName": "cli-v${version}",
10+
"tag": true,
11+
"push": true,
12+
"pushArgs": ["--follow-tags"]
13+
},
14+
"npm": {
15+
"publish": false
16+
},
17+
"hooks": {
18+
"before:release": "prettier --write CHANGELOG.md && git add CHANGELOG.md ",
19+
"after:release": "git checkout master && git push origin master:stable-v${version} || true && echo 更新版本 ${version} 成功!"
20+
},
21+
"plugins": {
22+
"@release-it/bumper": {
23+
"preset": "angular"
24+
},
25+
"@release-it/conventional-changelog": {
26+
"preset": "angular",
27+
"infile": "CHANGELOG.md",
28+
"ignoreRecommendedBump": true
29+
}
2930
}
30-
}
3131
}

0 commit comments

Comments
 (0)