mdx-js / eslint-mdx

ESLint Parser/Plugin for MDX
https://npmjs.org/eslint-plugin-mdx
MIT License
258 stars 29 forks source link

`prettier/prettier` reports, but cannot be fixed automatically #491

Open JounQin opened 7 months ago

JounQin commented 7 months ago

Initial checklist

Affected packages and versions

eslint-plugin-mdx

Link to runnable example

No response

Steps to reproduce

import     {     Baz   } from     './Fixture'

export  const   foo    = {
  hi:     `Fudge ${Baz.displayName || 'Baz'}`,
  authors: [
     'fred',
           'sally'
    ]
}

export const hello = 'hello'

# Hello,    world!

I'm an awesome   paragraph.

{ /* I'm a comment */ }

<Foo bg="red">
    <Bar>hi                                            </Bar>

  {  hello       }

  {     /* another comment */}
</Foo>

test codeblock


```js
module.exports = 'test'
npm i -g foo
Test Table
Col1 Col2

export default ({children }) => < div>{ children}



### Expected behavior

Format with `eslint-plugin-prettier` same as `prettier` cli itself

### Actual behavior

Incorrect formatting

### Runtime

Node v20

### Package manager

yarn v1

### OS

macOS

### Build and bundle tools

Rollup