'use strict'; module.exports = { meta: { docs: {} }, create(context) { // ignore non-modules if (context.parserOptions.sourceType !== 'module') { return {}; } const preferNamed = 'Prefer named exports.'; const noAliasDefault = (_ref) => { let local = _ref.local; return `Do not alias \`${local.name}\` as \`default\`. Just export ` + `\`${local.name}\` itself instead.`; }; return { ExportDefaultDeclaration(node) { context.report({ node, message: preferNamed }); }, ExportNamedDeclaration(node) { node.specifiers.forEach(specifier => { if (specifier.type === 'ExportDefaultSpecifier' && specifier.exported.name === 'default') { context.report({ node, message: preferNamed }); } else if (specifier.type === 'ExportSpecifier' && specifier.exported.name === 'default') { context.report({ node, message: noAliasDefault(specifier) }); } }); } }; } }; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJ1bGVzL25vLWRlZmF1bHQtZXhwb3J0LmpzIl0sIm5hbWVzIjpbIm1vZHVsZSIsImV4cG9ydHMiLCJtZXRhIiwiZG9jcyIsImNyZWF0ZSIsImNvbnRleHQiLCJwYXJzZXJPcHRpb25zIiwic291cmNlVHlwZSIsInByZWZlck5hbWVkIiwibm9BbGlhc0RlZmF1bHQiLCJsb2NhbCIsIm5hbWUiLCJFeHBvcnREZWZhdWx0RGVjbGFyYXRpb24iLCJub2RlIiwicmVwb3J0IiwibWVzc2FnZSIsIkV4cG9ydE5hbWVkRGVjbGFyYXRpb24iLCJzcGVjaWZpZXJzIiwiZm9yRWFjaCIsInNwZWNpZmllciIsInR5cGUiLCJleHBvcnRlZCJdLCJtYXBwaW5ncyI6Ijs7QUFBQUEsT0FBT0MsT0FBUCxHQUFpQjtBQUNmQyxRQUFNO0FBQ0pDLFVBQU07QUFERixHQURTOztBQUtmQyxTQUFPQyxPQUFQLEVBQWdCO0FBQ2Q7QUFDQSxRQUFJQSxRQUFRQyxhQUFSLENBQXNCQyxVQUF0QixLQUFxQyxRQUF6QyxFQUFtRDtBQUNqRCxhQUFPLEVBQVA7QUFDRDs7QUFFRCxVQUFNQyxjQU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