Skip to content

Commit 8b2d7dd

Browse files
committed
chore: update deps
1 parent 5beafbd commit 8b2d7dd

File tree

6 files changed

+48
-41
lines changed

6 files changed

+48
-41
lines changed

.eslintrc.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,14 @@ module.exports = {
6363
'comma-dangle': ['error', 'always-multiline'],
6464
'spaced-comment': 'error',
6565
strict: ['error', 'global'],
66-
'prettier/prettier': 'error',
66+
'space-before-function-paren': [
67+
'error',
68+
{
69+
anonymous: 'always',
70+
named: 'never',
71+
asyncArrow: 'always',
72+
},
73+
],
6774
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
6875
'@typescript-eslint/no-var-requires': 'off',
6976
'@typescript-eslint/no-explicit-any': 'off',

.husky/commit-msg

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run commitlint --edit $1

.husky/pre-commit

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run ygsec
5+
npm run lint-staged

.husky/pre-push

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run ygsec && npm run lint:fix

__tests__/lib/utils.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
const { ServerlessSDK } = require('@serverless/platform-client-china');
22

3-
const generateId = () =>
4-
Math.random()
5-
.toString(36)
6-
.substring(6);
3+
const generateId = () => Math.random().toString(36).substring(6);
74

85
const getServerlessSdk = (orgName: string, orgUid: string) => {
96
const sdk = new ServerlessSDK({

package.json

+26-36
Original file line numberDiff line numberDiff line change
@@ -15,73 +15,63 @@
1515
"commitlint": "commitlint -f HEAD@{15}",
1616
"lint": "eslint --ext .js,.ts,.tsx .",
1717
"lint:fix": "eslint --fix --ext .js,.ts,.tsx .",
18-
"prettier": "prettier --check '**/*.{css,html,js,ts,json,md,yaml,yml}'",
19-
"prettier:fix": "prettier --write '**/*.{css,html,js,ts,json,md,yaml,yml}'",
18+
"lint-staged": "lint-staged",
19+
"ygsec": "ygsec",
2020
"release": "semantic-release",
2121
"release-local": "node -r dotenv/config node_modules/semantic-release/bin/semantic-release --no-ci --dry-run",
22-
"check-dependencies": "npx npm-check --skip-unused --update"
23-
},
24-
"husky": {
25-
"hooks": {
26-
"pre-commit": "ygsec && lint-staged",
27-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
28-
"pre-push": "ygsec && npm run lint:fix && npm run prettier:fix"
29-
}
22+
"check-dependencies": "npx npm-check --skip-unused --update",
23+
"prepare": "husky install"
3024
},
3125
"lint-staged": {
3226
"**/*.{js,ts,tsx}": [
3327
"npm run lint:fix",
3428
"git add ."
35-
],
36-
"**/*.{css,html,js,ts,json,md,yaml,yml}": [
37-
"npm run prettier:fix",
38-
"git add ."
3929
]
4030
},
4131
"author": "Tencent Cloud, Inc.",
4232
"license": "MIT",
4333
"devDependencies": {
44-
"@commitlint/cli": "^8.3.5",
45-
"@commitlint/config-conventional": "^8.3.4",
34+
"@commitlint/cli": "^12.1.4",
35+
"@commitlint/config-conventional": "^12.1.4",
4636
"@semantic-release/changelog": "^5.0.0",
4737
"@semantic-release/commit-analyzer": "^8.0.1",
4838
"@semantic-release/git": "^9.0.0",
4939
"@semantic-release/npm": "^7.0.4",
5040
"@semantic-release/release-notes-generator": "^9.0.1",
51-
"@serverless/platform-client-china": "^2.1.14",
41+
"@serverless/platform-client-china": "^2.1.17",
5242
"@types/fs-extra": "^9.0.6",
53-
"@types/inquirer": "^7.3.1",
43+
"@types/inquirer": "^7.3.2",
5444
"@types/jest": "^26.0.20",
5545
"@types/js-yaml": "^4.0.0",
56-
"@types/node": "^15.0.2",
46+
"@types/node": "^16.0.0",
5747
"@types/semver": "^7.3.5",
58-
"@typescript-eslint/eslint-plugin": "^4.25.0",
59-
"@typescript-eslint/parser": "^4.25.0",
60-
"@ygkit/secure": "0.0.3",
61-
"axios": "^0.19.2",
48+
"@typescript-eslint/eslint-plugin": "^4.28.1",
49+
"@typescript-eslint/parser": "^4.28.1",
50+
"@ygkit/secure": "^0.0.10",
51+
"axios": "^0.21.1",
6252
"babel-eslint": "^10.1.0",
6353
"chalk": "^4.1.0",
64-
"commander": "^7.0.0",
65-
"dotenv": "^8.2.0",
66-
"eslint": "^6.8.0",
67-
"eslint-config-prettier": "^6.10.0",
54+
"commander": "^8.0.0",
55+
"dotenv": "^10.0.0",
56+
"eslint": "^7.30.0",
57+
"eslint-config-prettier": "^8.3.0",
6858
"eslint-plugin-import": "^2.20.1",
6959
"eslint-plugin-prettier": "^3.1.2",
70-
"fs-extra": "^9.1.0",
71-
"husky": "^4.2.5",
60+
"fs-extra": "^10.0.0",
61+
"husky": "^7.0.0",
7262
"inquirer": "^8.0.0",
73-
"jest": "^26.6.3",
63+
"jest": "^27.0.6",
7464
"js-yaml": "^4.0.0",
75-
"lint-staged": "^10.0.8",
65+
"lint-staged": "^11.0.0",
7666
"ncp": "^2.0.0",
7767
"ora": "^5.3.0",
78-
"prettier": "^1.19.1",
68+
"prettier": "^2.3.2",
7969
"semantic-release": "^17.0.4",
8070
"semver": "^7.3.5",
81-
"ts-jest": "^26.5.0",
82-
"ts-node": "^9.1.1",
83-
"typescript": "^4.1.3",
84-
"yargs": "^16.2.0"
71+
"ts-jest": "^27.0.3",
72+
"ts-node": "^10.0.0",
73+
"typescript": "^4.3.5",
74+
"yargs": "^17.0.1"
8575
},
8676
"directories": {
8777
"doc": "docs",

0 commit comments

Comments
 (0)