Suppress eslint warnings (#4953)

This commit is contained in:
Bjorn Lu 2022-10-03 23:37:21 +08:00 committed by GitHub
parent 953ddf1194
commit a59731995b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View file

@ -0,0 +1,5 @@
---
'@astrojs/mdx': patch
---
Log markdown hints with console.info

View file

@ -32,5 +32,11 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['packages/integrations/**/*.ts'],
rules: {
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }],
},
},
],
};

View file

@ -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 = {