mirror of
https://github.com/withastro/astro.git
synced 2025-03-17 23:11:29 -05:00
chore: disable console linting for CLI
This commit is contained in:
parent
33d0e5b2ab
commit
587765dc4d
4 changed files with 9 additions and 4 deletions
|
@ -117,6 +117,12 @@ module.exports = {
|
|||
'no-console': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/db/**/cli/**/*.ts'],
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['packages/astro/src/core/errors/errors-data.ts'],
|
||||
rules: {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable no-console */
|
||||
import { createClient, type InStatement } from '@libsql/client';
|
||||
import type { AstroConfig } from 'astro';
|
||||
import deepDiff from 'deep-diff';
|
||||
|
@ -206,5 +205,8 @@ async function prepareMigrateQuery({
|
|||
}),
|
||||
body: JSON.stringify(requestBody),
|
||||
});
|
||||
if (result.status >= 400) {
|
||||
throw new Error(await result.text())
|
||||
}
|
||||
return await result.json();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@ export async function cmd({ flags }: { config: AstroConfig; flags: Arguments })
|
|||
const query = flags.query;
|
||||
const appToken = flags.token ?? getAstroStudioEnv().ASTRO_STUDIO_APP_TOKEN;
|
||||
if (!appToken) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(appTokenError);
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
|
@ -23,12 +23,10 @@ export async function cli({ flags, config }: { flags: Arguments; config: AstroCo
|
|||
}
|
||||
default: {
|
||||
if (command == null) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`No command provided.
|
||||
|
||||
${showHelp()}`);
|
||||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(`Unknown command: ${command}
|
||||
|
||||
${showHelp()}`);
|
||||
|
|
Loading…
Add table
Reference in a new issue