Skip to content

Commit a885647

Browse files
authored
chore: bump father@4 (#532)
* chore: bump father@4 * chore: code clean * chore: update test case
1 parent f68f8a7 commit a885647

File tree

6 files changed

+31
-23
lines changed

6 files changed

+31
-23
lines changed

.fatherrc.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
export default {
2-
cjs: 'babel',
3-
esm: { type: 'babel', importLibToEs: true },
4-
preCommit: {
5-
eslint: true,
6-
prettier: true,
7-
},
8-
runtimeHelpers: true,
9-
};
1+
import { defineConfig } from 'father';
2+
3+
export default defineConfig({
4+
plugins: ['@rc-component/father-plugin'],
5+
});

.github/workflows/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
- uses: actions/setup-node@v1
1717
with:
18-
node-version: '12'
18+
node-version: '18'
1919

2020
- name: cache package-lock.json
2121
uses: actions/cache@v2
@@ -24,7 +24,7 @@ jobs:
2424
key: lock-${{ github.sha }}
2525

2626
- name: create package-lock.json
27-
run: npm i --package-lock-only
27+
run: npm i --package-lock-only --ignore-scripts
2828

2929
- name: hack for singe file
3030
run: |

.husky/pre-commit

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

package.json

+17-9
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,18 @@
3838
"prepublishOnly": "npm run compile && np --yolo --no-publish && npm run gh-pages",
3939
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
4040
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
41-
"pretty-quick": "pretty-quick",
42-
"test": "father test",
43-
"coverage": "father test --coverage",
44-
"now-build": "npm run docs:build"
41+
"test": "rc-test",
42+
"coverage": "rc-test --coverage",
43+
"now-build": "npm run docs:build",
44+
"prepare": "husky install"
4545
},
4646
"dependencies": {
4747
"@babel/runtime": "^7.10.1",
4848
"classnames": "^2.2.1",
4949
"rc-util": "^5.32.2"
5050
},
5151
"devDependencies": {
52+
"@rc-component/father-plugin": "^1.0.0",
5253
"@types/classnames": "^2.2.9",
5354
"@types/jest": "^29.2.2",
5455
"@types/keyv": "^3.1.4",
@@ -59,20 +60,21 @@
5960
"cross-env": "^7.0.0",
6061
"dumi": "^2.1.2",
6162
"enzyme": "^3.0.0",
62-
"enzyme-adapter-react-16": "^1.0.1",
63+
"enzyme-adapter-react-16": "^1.15.6",
6364
"enzyme-to-json": "^3.4.0",
6465
"eslint": "^7.0.0",
65-
"father": "^2.13.4",
66+
"father": "^4.0.0",
6667
"gh-pages": "^4.0.0",
6768
"glob": "^7.1.6",
69+
"husky": "^8.0.3",
6870
"less": "^3.10.3",
71+
"lint-staged": "^15.0.2",
6972
"np": "^7.0.0",
7073
"prettier": "^2.0.1",
71-
"pretty-quick": "^3.0.0",
7274
"rc-select": "^14.1.2",
75+
"rc-test": "^7.0.15",
7376
"react": "^16.0.0",
74-
"react-dom": "^16.0.0",
75-
"react-test-renderer": "^16.0.0"
77+
"react-dom": "^16.0.0"
7678
},
7779
"peerDependencies": {
7880
"react": ">=16.9.0",
@@ -83,5 +85,11 @@
8385
},
8486
"tnpm": {
8587
"mode": "npm"
88+
},
89+
"lint-staged": {
90+
"**/*.{js,jsx,tsx,ts,md,json}": [
91+
"prettier --write",
92+
"git add"
93+
]
8694
}
8795
}

tests/two-pagination.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import 'rc-select/assets/index.less';
2-
import React from 'react';
1+
// import 'rc-select/assets/index.less';
32
import Select from 'rc-select';
3+
import React from 'react';
44
import Pagination from '../src';
55

66
class Hello extends React.Component {

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"target": "esnext",
44
"moduleResolution": "node",
55
"baseUrl": "./",
6-
"jsx": "preserve",
6+
"jsx": "react",
77
"declaration": true,
88
"skipLibCheck": true,
99
"esModuleInterop": true,

0 commit comments

Comments
 (0)