amis-rpc-design/node_modules/@ant-design/cssinjs/es/linters/parentSelectorLinter.js

12 lines
387 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
import { lintWarning } from "./utils";
var linter = function linter(key, value, info) {
if (info.parentSelectors.some(function (selector) {
var selectors = selector.split(',');
return selectors.some(function (item) {
return item.split('&').length > 2;
});
})) {
lintWarning('Should not use more than one `&` in a selector.', info);
}
};
export default linter;