UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

16 lines 494 B
import { isImportFromPackage } from './is-import-from-package'; export var getAffectedPackageConfig = function getAffectedPackageConfig(source, affectedPackages) { if (typeof source !== 'string') { return null; } var packageName = Object.keys(affectedPackages).find(function (candidate) { return isImportFromPackage(source, candidate); }); if (!packageName) { return null; } return { packageName: packageName, importNames: affectedPackages[packageName] }; };