Skip to content

chore: Name the default export 'pluginXML'#977

Open
regseb wants to merge 1 commit intoprettier:mainfrom
regseb:named
Open

chore: Name the default export 'pluginXML'#977
regseb wants to merge 1 commit intoprettier:mainfrom
regseb:named

Conversation

@regseb
Copy link
Contributor

@regseb regseb commented Mar 7, 2026

When importing the default export, it's recommended to use the same name as the exported variable (cf. import-x/no-rename-default).

The variable name exported by plugin-xml is plugin. With the following configuration:

import pluginXML from "@prettier/plugin-xml";

const config = {
  plugins: [pluginXML],
  xmlQuoteAttributes: "double",
};

export default config;

ESLint reports this error:

Caution: plugin.js has a default export plugin. This imports plugin as pluginXML. Check if you meant to write import plugin from '@prettier/plugin-xml' instead


With this pull request, we will be able to use the name pluginXML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant