eslint-plugin-logical-properties
Version:
33 lines (32 loc) • 1.09 kB
JavaScript
import { generateDirectionalRules } from '../parsers/directional.js';
export const mappings = {
borderLeft: 'borderInlineStart',
borderLeftColor: 'borderInlineStartColor',
borderLeftStyle: 'borderInlineStartStyle',
borderLeftWidth: 'borderInlineStartWidth',
borderRight: 'borderInlineEnd',
borderRightColor: 'borderInlineEndColor',
borderRightStyle: 'borderInlineEndStyle',
borderRightWidth: 'borderInlineEndWidth',
borderTop: 'borderBlockStart',
borderTopColor: 'borderBlockStartColor',
borderTopStyle: 'borderBlockStartStyle',
borderTopWidth: 'borderBlockStartWidth',
borderBottom: 'borderBlockEnd',
borderBottomColor: 'borderBlockEndColor',
borderBottomStyle: 'borderBlockEndStyle',
borderBottomWidth: 'borderBlockEndWidth',
};
export const shorthandMappings = {
border: [
mappings.borderLeft,
mappings.borderRight,
mappings.borderTop,
mappings.borderBottom,
],
};
export const ruleConfig = {
mappings,
shorthandMappings,
};
export default generateDirectionalRules(ruleConfig);