diff options
author | 2022-10-03 23:37:21 +0800 | |
---|---|---|
committer | 2022-10-03 23:37:21 +0800 | |
commit | a59731995b93ae69c21dc3adc5c8b482b466d12e (patch) | |
tree | fde4105a6a93e7a9224b223a14298a12fa110446 | |
parent | 953ddf1194f3084f9c748a0b0281d4e3a8bcae48 (diff) | |
download | astro-a59731995b93ae69c21dc3adc5c8b482b466d12e.tar.gz astro-a59731995b93ae69c21dc3adc5c8b482b466d12e.tar.zst astro-a59731995b93ae69c21dc3adc5c8b482b466d12e.zip |
Suppress eslint warnings (#4953)
-rw-r--r-- | .changeset/tough-turkeys-teach.md | 5 | ||||
-rw-r--r-- | .eslintrc.cjs | 6 | ||||
-rw-r--r-- | packages/integrations/mdx/src/index.ts | 6 |
3 files changed, 14 insertions, 3 deletions
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 = { |