fix: 将原项目的console输出改为logger输出
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m11s
All checks were successful
deploy to server / build-and-deploy (push) Successful in 3m11s
- 添加eslint,不允许使用console输出
This commit is contained in:
@ -37,7 +37,7 @@ export const useMeilisearch = () => {
|
||||
|
||||
const host = runtimeConfig.public?.meili?.host;
|
||||
if (!host) {
|
||||
console.warn('Meilisearch host is not configured.');
|
||||
logger.warn('Meilisearch host is not configured.');
|
||||
return null;
|
||||
}
|
||||
const apiKey = runtimeConfig.public?.meili?.searchKey;
|
||||
@ -76,7 +76,7 @@ export const useMeilisearch = () => {
|
||||
|
||||
const activeIndexes = indexes.value as K[];
|
||||
if (!activeIndexes.length) {
|
||||
console.warn('No Meilisearch indexes configured.');
|
||||
logger.warn('No Meilisearch indexes configured.');
|
||||
return [];
|
||||
}
|
||||
const rawIndexMap = Object.fromEntries(
|
||||
@ -105,7 +105,7 @@ export const useMeilisearch = () => {
|
||||
result.status === 'rejected'
|
||||
)
|
||||
.forEach((result) => {
|
||||
console.error('Meilisearch query failed', result.reason);
|
||||
logger.error('Meilisearch query failed', result.reason);
|
||||
});
|
||||
|
||||
return settled
|
||||
|
||||
Reference in New Issue
Block a user