mirror of
https://gitea.redwind.top/Austin/subscription
synced 2024-11-16 02:12:21 +08:00
chore: add ci tool
This commit is contained in:
parent
a692d20940
commit
c18b6a8c9c
2
.eslintignore
Normal file
2
.eslintignore
Normal file
|
@ -0,0 +1,2 @@
|
|||
dist
|
||||
.eslintrc.cjs
|
22
.eslintrc.cjs
Normal file
22
.eslintrc.cjs
Normal file
|
@ -0,0 +1,22 @@
|
|||
// @ts-check
|
||||
const { defineConfig } = require('eslint-define-config');
|
||||
|
||||
module.exports = defineConfig({
|
||||
root: true,
|
||||
extends: [
|
||||
'eslint:recommended',
|
||||
'plugin:@typescript-eslint/recommended',
|
||||
'prettier',
|
||||
],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['@typescript-eslint'],
|
||||
rules: {
|
||||
'@typescript-eslint/ban-ts-comment': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'no-empty': 'off',
|
||||
'prefer-const': 'off',
|
||||
},
|
||||
});
|
17
.gitignore
vendored
17
.gitignore
vendored
|
@ -1,3 +1,20 @@
|
|||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.env
|
||||
.vscode
|
||||
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
.eslintcache
|
||||
|
|
4
.husky/commit-msg
Normal file
4
.husky/commit-msg
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm exec commitlint --edit ${1}
|
4
.husky/pre-commit
Normal file
4
.husky/pre-commit
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm exec lint-staged
|
4
.husky/pre-push
Normal file
4
.husky/pre-push
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
pnpm run check
|
|
@ -3,3 +3,5 @@ pnpm-workspace.yaml
|
|||
LICENCE
|
||||
|
||||
dist
|
||||
# README.md by pnpm build
|
||||
README.md
|
||||
|
|
|
@ -5,5 +5,5 @@
|
|||
export default {
|
||||
tabWidth: 2,
|
||||
singleQuote: true,
|
||||
trailingComma: "all",
|
||||
trailingComma: 'all',
|
||||
};
|
||||
|
|
34
package.json
34
package.json
|
@ -13,21 +13,32 @@
|
|||
"./dist"
|
||||
],
|
||||
"scripts": {
|
||||
"prepare": "husky install",
|
||||
"format": "prettier --cache --write .",
|
||||
"lint": "eslint --cache --fix ./**/*.{js,ts,jsx,tsx}",
|
||||
"build": "tsc --noEmit && tsx ./scripts/build.ts",
|
||||
"check": "tsc --noEmit && tsx ./scripts/check.ts",
|
||||
"sync": "tsx ./scripts/sync.ts"
|
||||
"check": "tsc --noEmit && tsx ./scripts/check.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^17.7.1",
|
||||
"@commitlint/config-conventional": "^17.7.0",
|
||||
"@gkd-kit/selector": "0.0.11",
|
||||
"@types/lodash": "^4.14.195",
|
||||
"@types/node": "^20.4.2",
|
||||
"@typescript-eslint/eslint-plugin": "6.5.0",
|
||||
"@typescript-eslint/parser": "6.5.0",
|
||||
"dayjs": "^1.11.9",
|
||||
"eslint": "^8.48.0",
|
||||
"eslint-config-prettier": "9.0.0",
|
||||
"eslint-define-config": "1.23.0",
|
||||
"husky": "^8.0.3",
|
||||
"lint-staged": "^14.0.1",
|
||||
"lodash": "^4.17.21",
|
||||
"picocolors": "^1.0.0",
|
||||
"prettier": "^3.0.1",
|
||||
"tsx": "^3.12.7",
|
||||
"typescript": "^5.1.6",
|
||||
"undici": "^5.23.0",
|
||||
"picocolors": "^1.0.0"
|
||||
"undici": "^5.23.0"
|
||||
},
|
||||
"author": "lisonge",
|
||||
"license": "MIT",
|
||||
|
@ -42,5 +53,18 @@
|
|||
"volta": {
|
||||
"node": "20.5.0"
|
||||
},
|
||||
"packageManager": "pnpm@8.7.1"
|
||||
"packageManager": "pnpm@8.7.1",
|
||||
"commitlint": {
|
||||
"extends": [
|
||||
"@commitlint/config-conventional"
|
||||
]
|
||||
},
|
||||
"lint-staged": {
|
||||
"*": [
|
||||
"prettier --cache --write --ignore-unknown"
|
||||
],
|
||||
"*.{js,ts,jsx,tsx}": [
|
||||
"eslint --cache --fix"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
2262
pnpm-lock.yaml
2262
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -1,10 +0,0 @@
|
|||
const r = await fetch(
|
||||
`https://registry-direct.npmmirror.com/@gkd-kit/subscription/sync`,
|
||||
{
|
||||
method: 'PUT',
|
||||
},
|
||||
);
|
||||
console.log(await r.json());
|
||||
console.log(`同步 npmmirror 成功`);
|
||||
|
||||
export {};
|
|
@ -25,9 +25,7 @@ export default defineAppConfig({
|
|||
enable: false,
|
||||
activityIds: 'com.douban.frodo.subject.activity.RatingActivity',
|
||||
rules: '[id="com.douban.frodo:id/check_status"][checked=true]',
|
||||
snapshotUrls: [
|
||||
'https://gkd-kit.gitee.io/import/12508777'
|
||||
]
|
||||
snapshotUrls: ['https://gkd-kit.gitee.io/import/12508777'],
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
|
@ -35,14 +33,16 @@ export default defineAppConfig({
|
|||
activityIds: 'com.douban.frodo.baseproject.image.SociableImageActivity',
|
||||
rules: [
|
||||
{
|
||||
matches: 'TextView[id="com.douban.frodo:id/ad_not_interest"][text="广告"][visibleToUser=true]',
|
||||
matches:
|
||||
'TextView[id="com.douban.frodo:id/ad_not_interest"][text="广告"][visibleToUser=true]',
|
||||
snapshotUrls: 'https://gkd-kit.gitee.io/import/12509475',
|
||||
},
|
||||
{
|
||||
matches: 'TextView[id="com.douban.frodo:id/mainText"][text="不感兴趣"]',
|
||||
matches:
|
||||
'TextView[id="com.douban.frodo:id/mainText"][text="不感兴趣"]',
|
||||
snapshotUrls: 'https://gkd-kit.gitee.io/import/12509476',
|
||||
},
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
|
|
@ -83,7 +83,7 @@ export default defineAppConfig({
|
|||
'TextView[text$=`的广告`] - Image[id=null]',
|
||||
'TextView[text*=`广告`] +2 Image[id=null]', // 1687338556331
|
||||
'TextView[text*=`点赞`][text*=`的回答`] +2 Image[id=null]', // 1687076663768 1686969672948
|
||||
`TextView[text=''] + Image[text=''] + TextView[text=''] + Image[id=null][clickable=true]`, // 1687234636980
|
||||
`TextView[text=''] + Image[text=''] + TextView[text='\u200b'] + Image[id=null][clickable=true]`, // 1687234636980
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user