Skip to content

Commit 78057a2

Browse files
committed
test: add test case for .md files
1 parent ed4ff97 commit 78057a2

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

test/fixtures/md.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Heading
2+
3+
```ts
4+
export declare const x = 1
5+
```

test/prettier.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const eslint = new ESLint({
3838
extends: 'plugin:prettier/recommended',
3939
overrides: [
4040
{
41-
files: '*.mdx',
41+
files: ['*.{md,mdx}'],
4242
extends: 'plugin:mdx/recommended',
4343
settings: {
4444
'mdx/code-block': true,
@@ -228,6 +228,26 @@ mdxRuleTester.run('eslint-plugin-mdx', rule, {
228228
],
229229
});
230230

231+
runFixture('*.md', [
232+
[
233+
{
234+
column: 27,
235+
endColumn: 27,
236+
endLine: 4,
237+
fix: {
238+
range: [43, 43],
239+
text: ';',
240+
},
241+
line: 4,
242+
message: 'Insert `;`',
243+
messageId: 'insert',
244+
nodeType: null,
245+
ruleId: 'prettier/prettier',
246+
severity: 2,
247+
},
248+
],
249+
]);
250+
231251
runFixture('*.mdx', [
232252
[
233253
{

0 commit comments

Comments
 (0)