Created
November 20, 2015 02:15
-
-
Save weikee94/ecb022f11bbeda36a763 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| testing 1 |
Author
Author
axios tips
// sending api checking
{
test_id: 1
...(queryValue?.test=== 'no' && {
area: queryValue?.test.replaceAll(' ', '').split(','),
}),
},
Author
const updateValue = (i, c) => {
// setValueText(c);
list.map((item, index) => {
if (index === i) {
item.fieldValue = c;
}
});
setList(list);
};
const addListItem = () => {
// setNameText('');
// setValueText('');
setList([...list, { fieldName: '', fieldValue: '' }]);
// setEmptyError(false);
};
Author
Commitlint setup
Install commitlint cli and conventional config
npm install --save-dev @commitlint/config-conventional @commitlint/cli
Configure commitlint to use conventional config
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
Install Husky v6
npm install husky --save-dev
Activate hooks
npx husky install
Add hook for lint-staged and commitlint
npx husky add .husky/commit-msg 'npx lint-staged && npx --no -- commitlint --edit ${1}'
Author
How to reset
Project directory check hooksPath
cat .git/config
Reset the hooksPath every file inside ".git/hooks/" is either a git-hook or ignored by git. By removing everything inside, you'll get rid of all hooks, and restore the default behavior.
npm uninstall husky && git config --unset core.hooksPath
Author
Interval
useEffect(() => {
const interval = setInterval(() => {
getList(
{
limit: pageState?.pageSize, // 分页获取数量
page: pageState?.pageNum,
},
);
}, 60000);
return () => {
clearInterval(interval);
};
}, [pageState]);
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
css