Skip to content

Conversation

@JounQin
Copy link
Member

@JounQin JounQin commented Dec 21, 2023

The following is unnecessary anymore when using with eslint-mdx/eslint-plugin-mdx!

[
  {
    files: ["**/*.md"],
    rules: { "prettier/prettier": ["error", { parser: "markdown" }] },
  },
  {
    files: ["**/*.mdx"],
    rules: { "prettier/prettier": ["error", { parser: "mdx" }] },
  },
]

@changeset-bot
Copy link

changeset-bot bot commented Dec 21, 2023

🦋 Changeset detected

Latest commit: 535c3af

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
eslint-plugin-prettier Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JounQin JounQin changed the title feat: support parsing markdown via eslint-mdx natively feat: support parsing markdown via eslint-mdx natively Dec 21, 2023
@JounQin
Copy link
Member Author

JounQin commented Dec 21, 2023

We can also support other HTML related ESLint plugins like https://github.com/yeonjuan/html-eslint or https://github.com/un-ts/eslint/tree/main/packages/markup

@JounQin
Copy link
Member Author

JounQin commented Dec 21, 2023

@BPScott Any time to review?

Copy link
Member

@BPScott BPScott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me.

Does this change mean older versions of any packages will stop working or is this a purely forwards-compatible change? I'm wondering if we need to call any "You should update this other package" stuff in the changeset

Added a few polishing thoughts inline as the changeset prettierrc, package patches and dependency changes seem unrelated to the changes to the worker.

@JounQin
Copy link
Member Author

JounQin commented Dec 22, 2023

@BPScott This PR is totally backwards/forwards compatible and won't break anything. It's a minor enhancement.

@JounQin JounQin requested a review from BPScott December 23, 2023 08:44
@JounQin JounQin merged commit 2b09e7f into master Dec 24, 2023
@JounQin JounQin deleted the feat/eslint-mdx branch December 24, 2023 03:30
renovate bot added a commit to andrei-picus-tink/auto-renovate that referenced this pull request Aug 15, 2024
| datasource | package                | from  | to    |
| ---------- | ---------------------- | ----- | ----- |
| npm        | eslint-plugin-prettier | 4.2.1 | 5.2.1 |


##### [\`v5.2.1\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#521)

##### Patch Changes

-   [#668](prettier/eslint-plugin-prettier#668) [`ac036cc`](prettier/eslint-plugin-prettier@ac036cc) Thanks [@OrlovAlexei](https://github.com/OrlovAlexei)! - build(deps): Bump synckit from 0.8.6 to 0.9.1
##### [\`v5.1.3\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#513)

##### Patch Changes

-   [#629](prettier/eslint-plugin-prettier#629) [`985b33c`](prettier/eslint-plugin-prettier@985b33c) Thanks [@JounQin](https://github.com/JounQin)! - chore: add `package.json` into `exports` map
##### [\`v5.1.2\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#512)

##### Patch Changes

-   [#623](prettier/eslint-plugin-prettier#623) [`8210e44`](prettier/eslint-plugin-prettier@8210e44) Thanks [@BPScott](https://github.com/BPScott)! - Add exports mapping to package.json, to allow `import eslintPluginRecommended from 'eslint-plugin-prettier/recommended'` to work as expected.

    Strictly speaking this is a breaking change as it removes the ability for people to import from "eslint-plugin-prettier/eslint-plugin-prettier.js" and "eslint-plugin-prettier/recommended.js" but the former was never recommended in the first place and the latter has only been available for a few days.

-   [#621](prettier/eslint-plugin-prettier#621) [`2b09e7f`](prettier/eslint-plugin-prettier@2b09e7f) Thanks [@JounQin](https://github.com/JounQin)! - feat: support parsing `markdown` via `eslint-mdx` natively
##### [\`v5.1.1\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#511)

##### Patch Changes

-   [#619](prettier/eslint-plugin-prettier#619) [`b5c0dc5`](prettier/eslint-plugin-prettier@b5c0dc5) Thanks [@JounQin](https://github.com/JounQin)! - chore: skip formatting inline scripts in pug files
##### [\`v5.1.0\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#510)

##### Minor Changes

-   [#616](prettier/eslint-plugin-prettier#616) [`3856413`](prettier/eslint-plugin-prettier@3856413) Thanks [@BPScott](https://github.com/BPScott)! - Add recommended config for the flat config format.

    If you are using flat config, import the recommended config from `eslint-plugin-prettier/recommended`. Like the legacy format recommended config, this automatically includes the contents of `eslint-config-prettier`.

    ```js
    // eslint.config.js
    const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended');

    module.exports = [
      // Any other config imports go at the top
      eslintPluginPrettierRecommended,
    ];
    ```

##### Patch Changes

-   [#614](prettier/eslint-plugin-prettier#614) [`5270877`](prettier/eslint-plugin-prettier@5270877) Thanks [@BPScott](https://github.com/BPScott)! - Add meta block to plugin. This improves debugging and cachebusting when using the new flat config

-   [#603](prettier/eslint-plugin-prettier#603) [`a63a570`](prettier/eslint-plugin-prettier@a63a570) Thanks [@filiptammergard](https://github.com/filiptammergard)! - fix: specify `eslint-config-prettier` as peer dependency

    It's already added to `peerDependenciesMeta` as optional, which means it should also be specified in `peerDependencies`.
##### [\`v5.0.1\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#501)

##### Patch Changes

-   [#588](prettier/eslint-plugin-prettier#588) [`21a7146`](prettier/eslint-plugin-prettier@21a7146) Thanks [@krist7599555](https://github.com/krist7599555)! - fix: `parserPath` type might be `undefined` on Eslint Falt Config
##### [\`v5.0.0\`](https://github.com/prettier/eslint-plugin-prettier/blob/HEAD/CHANGELOG.md#500)

##### Major Changes

-   [#508](prettier/eslint-plugin-prettier#508) [`910aeb6`](prettier/eslint-plugin-prettier@910aeb6) Thanks [@JounQin](https://github.com/JounQin)! - feat!: bump peer eslint to ">=8.0.0" and node to "^14.18.0 || >=16.0.0"

-   [#508](prettier/eslint-plugin-prettier#508) [`910aeb6`](prettier/eslint-plugin-prettier@910aeb6) Thanks [@JounQin](https://github.com/JounQin)! - feat!: upgrade to prettier v3

##### Minor Changes

-   [#508](prettier/eslint-plugin-prettier#508) [`910aeb6`](prettier/eslint-plugin-prettier@910aeb6) Thanks [@JounQin](https://github.com/JounQin)! - feat: add typings support

##### Patch Changes

-   [#548](prettier/eslint-plugin-prettier#548) [`82a3db8`](prettier/eslint-plugin-prettier@82a3db8) Thanks [@fisker](https://github.com/fisker)! - fix: add missing dependency `synckit`

-   [#564](