Skip to content

Commit 0de4436

Browse files
committed
[optimize] upgrade Upstream packages
1 parent c7fff71 commit 0de4436

File tree

4 files changed

+43
-33
lines changed

4 files changed

+43
-33
lines changed

.eslintrc.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@
1212
"jsx": true
1313
}
1414
},
15-
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
15+
"plugins": ["@typescript-eslint"],
16+
"extends": [
17+
"eslint:recommended",
18+
"plugin:@typescript-eslint/recommended",
19+
"prettier"
20+
],
1621
"rules": {
1722
"no-unused-vars": "warn",
18-
"no-undef": "warn"
23+
"no-undef": "warn",
24+
"@typescript-eslint/ban-types": "warn",
25+
"@typescript-eslint/explicit-module-boundary-types": "off"
1926
}
2027
}

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm test

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
. "$(dirname "$0")/_/husky.sh"
4+
5+
npm run build

package.json

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,35 @@
2323
"source": "source/index.ts",
2424
"types": "dist/index.d.ts",
2525
"dependencies": {
26-
"web-utility": "^2.4.4"
26+
"web-utility": "^2.6.0"
2727
},
2828
"peerDependencies": {
2929
"@webcomponents/webcomponentsjs": "^2.5.0",
30-
"core-js": "^3.9.0",
31-
"jsdom": "^16.4.0"
30+
"core-js": "^3.16.0",
31+
"jsdom": "^16.6.0"
3232
},
3333
"devDependencies": {
3434
"@types/core-js": "^2.5.4",
35-
"@types/jest": "^26.0.20",
36-
"@types/jsdom": "^16.2.6",
37-
"@typescript-eslint/parser": "^4.15.2",
38-
"element-internals-polyfill": "0.1.9",
39-
"eslint": "^7.20.0",
40-
"eslint-config-prettier": "^8.0.0",
41-
"eslint-plugin-prettier": "^3.3.1",
42-
"husky": "^4.3.8",
43-
"jest": "^26.6.3",
44-
"lint-staged": "^10.5.4",
45-
"open-cli": "^6.0.1",
46-
"parcel-bundler": "^1.12.4",
47-
"prettier": "^2.2.1",
35+
"@types/jest": "^26.0.24",
36+
"@types/jsdom": "^16.2.13",
37+
"@typescript-eslint/eslint-plugin": "^4.28.5",
38+
"@typescript-eslint/parser": "^4.28.5",
39+
"element-internals-polyfill": "0.1.43",
40+
"eslint": "^7.32.0",
41+
"eslint-config-prettier": "^8.3.0",
42+
"husky": "^7.0.1",
43+
"jest": "^27.0.6",
44+
"lint-staged": "^11.1.1",
45+
"open-cli": "^7.0.0",
46+
"parcel-bundler": "^1.12.5",
47+
"prettier": "^2.3.2",
4848
"snabbdom": "^2.1.0",
49-
"ts-jest": "^26.5.2",
50-
"typedoc": "^0.20.28",
51-
"typescript": "^4.2.2"
49+
"ts-jest": "^27.0.4",
50+
"typedoc": "^0.21.5",
51+
"typescript": "^4.3.5"
5252
},
5353
"scripts": {
54+
"prepare": "husky install",
5455
"lint": "lint-staged",
5556
"test": "npm run lint && jest",
5657
"pack-type": "tsc && rm -f dist/*.{js,map} dist/**/*.{js,map}",
@@ -62,17 +63,8 @@
6263
},
6364
"lint-staged": {
6465
"source/**/*.{ts,tsx}": "eslint --fix",
65-
"*.{js,ts,tsx}": [
66-
"prettier --write",
67-
"eslint --fix --rule 'require-atomic-updates: 1'"
68-
],
69-
"*.{html,md,css,json,yml}": "prettier --write"
70-
},
71-
"husky": {
72-
"hooks": {
73-
"pre-commit": "npm test",
74-
"pre-push": "npm run build"
75-
}
66+
"*.{js,ts,tsx}": "eslint --fix --rule 'require-atomic-updates: 1'",
67+
"*.{html,md,css,json,yml,js,ts,tsx}": "prettier --write"
7668
},
7769
"prettier": {
7870
"singleQuote": true,
@@ -81,10 +73,11 @@
8173
"tabWidth": 4
8274
},
8375
"jest": {
76+
"testEnvironment": "jsdom",
8477
"preset": "ts-jest/presets/js-with-ts",
8578
"globals": {
8679
"ts-jest": {
87-
"tsConfig": "test/tsconfig.json",
80+
"tsconfig": "test/tsconfig.json",
8881
"isolatedModules": true
8982
}
9083
},

0 commit comments

Comments
 (0)