mirror of
https://github.com/axios/axios.git
synced 2026-04-11 02:11:50 +08:00
chore: remove unnecessary eslint-disable directive (#7283)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
parent
38be3b2e18
commit
3141c319c2
@ -5,11 +5,11 @@ import fs from 'fs/promises';
|
||||
const argv = minimist(process.argv.slice(2));
|
||||
console.log(argv);
|
||||
|
||||
let {tag} = argv;
|
||||
let { tag } = argv;
|
||||
|
||||
(async() => {
|
||||
(async () => {
|
||||
if (!tag || tag === true) {
|
||||
const {version} = JSON.parse((await fs.readFile('./package.json')).toString());
|
||||
const { version } = JSON.parse((await fs.readFile('./package.json')).toString());
|
||||
|
||||
tag = 'v' + version;
|
||||
} else if (typeof tag !== 'string') {
|
||||
|
||||
@ -21,7 +21,7 @@ export default function mergeConfig(config1, config2) {
|
||||
|
||||
function getMergedValue(target, source, prop, caseless) {
|
||||
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
||||
return utils.merge.call({caseless}, target, source);
|
||||
return utils.merge.call({ caseless }, target, source);
|
||||
} else if (utils.isPlainObject(source)) {
|
||||
return utils.merge({}, source);
|
||||
} else if (utils.isArray(source)) {
|
||||
@ -30,7 +30,6 @@ export default function mergeConfig(config1, config2) {
|
||||
return source;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
function mergeDeepProperties(a, b, prop, caseless) {
|
||||
if (!utils.isUndefined(b)) {
|
||||
return getMergedValue(a, b, prop, caseless);
|
||||
@ -96,7 +95,7 @@ export default function mergeConfig(config1, config2) {
|
||||
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
||||
};
|
||||
|
||||
utils.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
||||
utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
||||
const merge = mergeMap[prop] || mergeDeepProperties;
|
||||
const configValue = merge(config1[prop], config2[prop], prop);
|
||||
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user