diff --git a/.changeset/tough-turkeys-teach.md b/.changeset/tough-turkeys-teach.md new file mode 100644 index 000000000..50dcc322a --- /dev/null +++ b/.changeset/tough-turkeys-teach.md @@ -0,0 +1,5 @@ +--- +'@astrojs/mdx': patch +--- + +Log markdown hints with console.info diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 6393ca681..2652a454e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -32,5 +32,11 @@ module.exports = { 'no-console': 'off', }, }, + { + files: ['packages/integrations/**/*.ts'], + rules: { + 'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }], + }, + }, ], }; diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index de72e40f1..eb769535a 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -50,15 +50,15 @@ export default function mdx(mdxOptions: MdxOptions = {}): AstroIntegration { mdxOptions.extendPlugins === 'markdown' && (config.markdown.rehypePlugins?.length || config.markdown.remarkPlugins?.length) ) { - console.log( + console.info( blue(`[MDX] Now inheriting remark and rehype plugins from "markdown" config.`) ); - console.log( + console.info( `If you applied a plugin to both your Markdown and MDX configs, we suggest ${bold( 'removing the duplicate MDX entry.' )}` ); - console.log(`See "extendPlugins" option to configure this behavior.`); + console.info(`See "extendPlugins" option to configure this behavior.`); } const mdxPluginOpts: MdxRollupPluginOptions = {