diff --git a/package.json b/package.json index 3cf58d0da9c18783a15cfb832370acae56b9a85f..e6eb407d4813bc1f7434cd7d76a665eeced2e71c 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,17 @@ "lint-staged": { "**/*.less": "stylelint --syntax less", "**/*.{js,jsx}": "npm run lint-staged:js", - "**/*.{js,ts,tsx,md,json,jsx,less}": [ "npm run prettier", "git add" ], + "**/*.{js,ts,tsx,md,json,jsx,less}": [ + "npm run prettier", + "git add" + ], "**/*.{ts,tsx}": "npm run lint-staged:ts" }, - "browserslist": [ "> 1%", "last 2 versions", "not ie <= 10" ], + "browserslist": [ + "> 1%", + "last 2 versions", + "not ie <= 10" + ], "dependencies": { "@ant-design/pro-layout": "^4.2.0", "@antv/data-set": "^0.10.1", @@ -79,11 +86,12 @@ "devDependencies": { "@types/classnames": "^2.2.7", "@types/history": "^4.7.2", + "@types/jest": "^24.0.13", "@types/lodash": "^4.14.123", + "@types/qs": "^6.5.3", "@types/react": "^16.8.1", "@types/react-document-title": "^2.0.3", "@types/react-dom": "^16.0.11", - "@types/qs": "^6.5.3", "antd-pro-merge-less": "^1.0.0", "antd-theme-webpack-plugin": "^1.2.0", "babel-eslint": "^10.0.1", @@ -142,8 +150,14 @@ ], "create-umi": { "copy": [ - ["create-umi/README.md", "README.md"], - ["create-umi/package.json", "package.json"] + [ + "create-umi/README.md", + "README.md" + ], + [ + "create-umi/package.json", + "package.json" + ] ], "ignore": [ ".dockerignore", diff --git a/src/utils/utils.test.ts b/src/utils/utils.test.ts index 984d9cdef0b67ffad5dcd4950c8e1479029ff682..3828b880ff0eb8106fa233faf2b252128e4cc0fb 100644 --- a/src/utils/utils.test.ts +++ b/src/utils/utils.test.ts @@ -9,7 +9,7 @@ describe('isUrl tests', () => { expect(isUrl(true as any)).toBeFalsy(); expect(isUrl(NaN as any)).toBeFalsy(); expect(isUrl(null as any)).toBeFalsy(); - expect(isUrl(void 0 as any)).toBeFalsy(); + expect(isUrl(undefined as any)).toBeFalsy(); expect(isUrl('')).toBeFalsy(); });