保存进度!

This commit is contained in:
Kane 2023-03-05 22:55:59 +08:00
parent 52bcee8d39
commit b2712087a0
2 changed files with 18 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* @Author: Kane
* @Date: 2022-12-14 15:12:46
* @LastEditors: Kane
* @LastEditTime: 2023-03-05 00:14:41
* @LastEditTime: 2023-03-05 21:35:01
* @FilePath: /task_schedule/.eslintrc.cjs
* @Description:
*
@ -81,6 +81,11 @@ module.exports = {
"exports": "never",
"functions": "never",
},], //数组和对象键值对最后一个逗号
"@typescript-eslint/quotes": ["error", "double",],
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/strict-boolean-expressions": ["error", {
"allowString": true,
},],
"comma-style": ["error", "last",], //逗号在行位
"array-bracket-spacing": ["error", "never",],
"no-undef-init": "error",
@ -88,6 +93,8 @@ module.exports = {
"no-use-before-define": "error",
"no-shadow-restricted-names": "error", //禁止对一些关键字或者保留字进行赋值操作比如NaN、Infinity、undefined、eval、arguments等
"prefer-const": "warn",
"spaced-comment": "error",
"space-before-function-paren": "off",
},
},
],

View File

@ -15,7 +15,7 @@ type stringkey = Record<string, string>;
* @param url 访url
* @returns
*/
function getURLParams(url: string)
function getURLParams(url: string): Record<string, string>
{
const arr = url.split("?");
const params = arr[1].split("&");
@ -38,7 +38,6 @@ function getURLParams(url: string)
*/
function getParamsFromURL(url: string): stringkey
{
const indexOfQuestionMark: number = url.indexOf("?");
const indexOfSharp: number = url.indexOf("#");
const paramObj: stringkey = {};
@ -69,7 +68,7 @@ function getParamsFromURL(url: string): stringkey
paramArray.forEach((item) =>
{
if (item.length == 0)
if (item.length === 0)
{
return;
}