Skip to content

Commit

Permalink
Suppress eslint warnings (#4953)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Oct 3, 2022
1 parent 953ddf1 commit a597319
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tough-turkeys-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/mdx': patch
---

Log markdown hints with console.info
6 changes: 6 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,11 @@ module.exports = {
'no-console': 'off',
},
},
{
files: ['packages/integrations/**/*.ts'],
rules: {
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }],
},
},
],
};
6 changes: 3 additions & 3 deletions packages/integrations/mdx/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit a597319

Please sign in to comment.