Skip to content

deprecate rule prettier since eslint-plugin-prettier itself supports virtual filenames correctly now #395

@JounQin

Description

@JounQin

See

https://github.com/prettier/eslint-plugin-prettier/pull/401/files#diff-e9a90fe7b2d3420b8e5f64e24d5f56ffe6383e47b07461172cc29ed21b768905R197-R199

and

https://github.com/prettier/eslint-plugin-prettier/blob/master/eslint-plugin-prettier.js#L192-L209


Besides, actually it is supported previously too. All the user need to do is like the following:

module.exports = {
  // ...
  overrides: [
    {
      files: '*.graphql', // it includes virtual filenames like `*.js/0_document.graphql` already
      rules: {
        'prettier/prettier': [
          2,
          {
            parser: 'graphql',
          },
        ],
      },
    },
  ],
}
After `[email protected]`, the above configuration is not needed any more too!

Maybe in [email protected] after prettier/eslint-plugin-prettier#413 and prettier/eslint-plugin-prettier#415 been merged and released.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/enhancementNew feature or requeststage/5-alpha-release-testingThe pull request is merged, an alpha release is available, to be tested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions