Skip to content

Commit a597319

Browse files
authored
Suppress eslint warnings (#4953)
1 parent 953ddf1 commit a597319

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.changeset/tough-turkeys-teach.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@astrojs/mdx': patch
3+
---
4+
5+
Log markdown hints with console.info

.eslintrc.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,11 @@ module.exports = {
3232
'no-console': 'off',
3333
},
3434
},
35+
{
36+
files: ['packages/integrations/**/*.ts'],
37+
rules: {
38+
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }],
39+
},
40+
},
3541
],
3642
};

packages/integrations/mdx/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ export default function mdx(mdxOptions: MdxOptions = {}): AstroIntegration {
5050
mdxOptions.extendPlugins === 'markdown' &&
5151
(config.markdown.rehypePlugins?.length || config.markdown.remarkPlugins?.length)
5252
) {
53-
console.log(
53+
console.info(
5454
blue(`[MDX] Now inheriting remark and rehype plugins from "markdown" config.`)
5555
);
56-
console.log(
56+
console.info(
5757
`If you applied a plugin to both your Markdown and MDX configs, we suggest ${bold(
5858
'removing the duplicate MDX entry.'
5959
)}`
6060
);
61-
console.log(`See "extendPlugins" option to configure this behavior.`);
61+
console.info(`See "extendPlugins" option to configure this behavior.`);
6262
}
6363

6464
const mdxPluginOpts: MdxRollupPluginOptions = {

0 commit comments

Comments
 (0)