Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document usage in flat config #455

Closed
4 tasks done
levino opened this issue Apr 20, 2023 · 1 comment · Fixed by #468 or #469
Closed
4 tasks done

Document usage in flat config #455

levino opened this issue Apr 20, 2023 · 1 comment · Fixed by #468 or #469
Assignees

Comments

@levino
Copy link

levino commented Apr 20, 2023

Initial checklist

Problem

It is unclear how to use this package with the new eslint flat config.

Solution

Provide documentation on how to use this package with an eslint flat config. Potentially one would have to show how to use the backwards compatibility tool until the exports of this library have been changed.

Alternatives

I would say no.

@JounQin
Copy link
Member

JounQin commented May 2, 2023

Basically, it should be something like following:

// eslint.config.js

import * as eslintMdx from 'eslint-mdx'
import * as mdx from 'eslint-plugin-mdx'

export default [
  {
    files: ['**/*.mdx'],
    plugins: {
      mdx,
    },
    languageOptions: {
      parser: eslintMdx,
    },
    processor: mdx.processors.remark,
    settings: {
      'mdx/code-blocks': true, // this won't work sadly
    },
    rules: {
      'no-console': 'error',
    },
  },
]

We're blocked by eslint/eslint#12068

@ChristianMurphy ChristianMurphy added the 🌊 blocked/upstream This cannot progress before something external happens first label Jul 28, 2023
@JounQin JounQin self-assigned this Aug 3, 2023
JounQin added a commit that referenced this issue Aug 3, 2023
JounQin added a commit that referenced this issue Aug 3, 2023
@JounQin JounQin removed the 🌊 blocked/upstream This cannot progress before something external happens first label Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants