chore: eslint

pull/33/head
xingyu 2023-08-23 15:19:09 +08:00
parent 65e7aeea48
commit bda764a7ff
2 changed files with 4 additions and 2 deletions

View File

@ -12,6 +12,7 @@ module.exports = {
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-misused-promises': 'off',
'prefer-promise-reject-errors': 'off',
'no-case-declarations': 'off',
'no-console': 'off',

View File

@ -175,11 +175,12 @@ const transform: AxiosTransform = {
requestInterceptors: (config, options) => {
// 是否需要设置 token
let isToken = (config as Recordable)?.requestOptions?.withToken === false
whiteList.some((v) => {
isToken = whiteList.some((v) => {
if (config.url) {
config.url.includes(v)
return (isToken = false)
return false
}
return true
})
// 请求之前处理config
const token = getAccessToken()