We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c204a03 commit 8dfa229Copy full SHA for 8dfa229
src/rules/prefer-default-export.js
@@ -105,12 +105,9 @@ module.exports = {
105
if (hasDefaultExport || hasStarExport || hasTypeExport) {
106
return;
107
}
108
- if (target === 'single') {
109
- if (specifierExportCount === 1) {
110
- context.report(namedExportNode, SINGLE_EXPORT_ERROR_MESSAGE);
111
- }
112
- } else if (target === 'any') {
113
- if (specifierExportCount > 0) {
+ if (target === 'single' && specifierExportCount === 1) {
+ context.report(namedExportNode, SINGLE_EXPORT_ERROR_MESSAGE);
+ } else if (target === 'any' && specifierExportCount > 0) {
114
context.report(namedExportNode, ANY_EXPORT_ERROR_MESSAGE);
115
116
0 commit comments