mirror of
https://github.com/withastro/astro.git
synced 2025-03-24 23:21:57 -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',
|
'no-console': 'off',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
files: ['packages/db/**/cli/**/*.ts'],
|
||||||
|
rules: {
|
||||||
|
'no-console': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
files: ['packages/astro/src/core/errors/errors-data.ts'],
|
files: ['packages/astro/src/core/errors/errors-data.ts'],
|
||||||
rules: {
|
rules: {
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
/* eslint-disable no-console */
|
|
||||||
import { createClient, type InStatement } from '@libsql/client';
|
import { createClient, type InStatement } from '@libsql/client';
|
||||||
import type { AstroConfig } from 'astro';
|
import type { AstroConfig } from 'astro';
|
||||||
import deepDiff from 'deep-diff';
|
import deepDiff from 'deep-diff';
|
||||||
|
@ -206,5 +205,8 @@ async function prepareMigrateQuery({
|
||||||
}),
|
}),
|
||||||
body: JSON.stringify(requestBody),
|
body: JSON.stringify(requestBody),
|
||||||
});
|
});
|
||||||
|
if (result.status >= 400) {
|
||||||
|
throw new Error(await result.text())
|
||||||
|
}
|
||||||
return await result.json();
|
return await result.json();
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,6 @@ export async function cmd({ flags }: { config: AstroConfig; flags: Arguments })
|
||||||
const query = flags.query;
|
const query = flags.query;
|
||||||
const appToken = flags.token ?? getAstroStudioEnv().ASTRO_STUDIO_APP_TOKEN;
|
const appToken = flags.token ?? getAstroStudioEnv().ASTRO_STUDIO_APP_TOKEN;
|
||||||
if (!appToken) {
|
if (!appToken) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error(appTokenError);
|
console.error(appTokenError);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,10 @@ export async function cli({ flags, config }: { flags: Arguments; config: AstroCo
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
if (command == null) {
|
if (command == null) {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error(`No command provided.
|
console.error(`No command provided.
|
||||||
|
|
||||||
${showHelp()}`);
|
${showHelp()}`);
|
||||||
} else {
|
} else {
|
||||||
// eslint-disable-next-line no-console
|
|
||||||
console.error(`Unknown command: ${command}
|
console.error(`Unknown command: ${command}
|
||||||
|
|
||||||
${showHelp()}`);
|
${showHelp()}`);
|
||||||
|
|
Loading…
Add table
Reference in a new issue