Skip to content

interfering-imported-style-base

Reports an imported base style that sets the same property as another style in the call.

This rule reports a base style from another module that sets the same property as another base or utility in the call, when neither is built on the other. The order of the arguments does not decide which one wins.

Project files

bases.tsts
import { style } from "stillwind/react";
export const first = style("p-2");
export const second = style("p-4");
export const combined = style(first, "p-4");

Reported

import { first, second } from "./bases";
export const props = style(first, second);interfering-imported-style-base: the base in `bases.ts` overlaps these declarations: `padding`

Fixed

import { combined } from "./bases";
export const props = style(combined);

How to fix

  • In the module that defines the styles, build the overriding style on the other one, as combined does. Then import that style.
  • Or remove the property from one of the styles.

Changing the order of the arguments in the importing module does not fix it.

Rule settings

PresetSeverity
recommendedwarn
strictdeny
stylisticoff

Configure lint to change the severity or options.

The CLI and the editor report this rule only when they analyze the whole project.