为什么这一章节老师说的eslint报错我都没有啊
来源:10-1 useCallback应用,优化异步请求

瘸腿猫Vivian
2022-09-05
1.没有报错信息
2. 用useCallback包裹的函数也没有提示需要把哪些值放入[]
package.json
{
"name": "jira",
"version": "0.1.0",
"private": true,
"dependencies": {
"@craco/craco": "^6.4.5",
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.5.2",
"@types/node": "^16.11.56",
"@types/react": "^18.0.18",
"@types/react-dom": "^18.0.6",
"antd": "^4.22.8",
"craco-less": "^2.0.0",
"dayjs": "^1.11.5",
"history": "^5.3.0",
"jira-dev-tool": "^1.6.59",
"qs": "^6.11.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-query": "3.5.10",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"serve": "^14.0.1",
"typescript": "^4.8.2",
"web-vitals": "^2.1.4"
},
"scripts": {
"start": "craco start",
"build": "craco build",
"test": "craco test",
"eject": "craco eject",
"serve": "yarn serve -s build",
"prepare": "husky install"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest",
"prettier"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"eslint-config-prettier": "^8.5.0",
"husky": "^8.0.1",
"json-server": "^0.17.0",
"lint-staged": "^13.0.3",
"prettier": "2.7.1"
},
"lint-staged": {
"*.{js,css,md,ts,tsx}": "prettier --write"
},
"msw": {
"workerDirectory": "public"
}
}
写回答
1回答
-
玥玥颜
2023-04-06
我没出现warning的原因是vscode没有安装eslint插件
00
相似问题