UNPKG

@atlaskit/eslint-plugin-design-system

Version:

The essential plugin for use with the Atlassian Design System.

15 lines (14 loc) • 478 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isModuleFromPackage = isModuleFromPackage; /** * Whether `specifier` loads `packageName` or one of its subpaths. A scope, such as * `'@floating-ui'`, matches every package in that scope. */ function isModuleFromPackage(_ref) { var specifier = _ref.specifier, packageName = _ref.packageName; return specifier === packageName || specifier.startsWith("".concat(packageName, "/")); }