1.1.4 • Published 2 years ago

@helious/emotion-mirror v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@helious/emotion-mirror

npm version npm downloads

Welcome to @helious/emotion-mirror - a way for us to utilize @emotion/react's styled that allows for self-reflection on the styles it creates. @helious/emotion-mirror's wrapped styled will allow you to get real-time feedback on invalid (or lint issues, all via stylelint) CSS styles at runtime via the browser console when rendering your Styled Components!

Install

npm i @helious/emotion-mirror

Usage

@helious/emotion-mirror is intended to provide a direct replacement for @emotion/react's styled.

More documentation is available at https://emotion.sh/docs/styled.

stylelint Configuration

You may add any of the available stylelint rules and/or add overrides for the default rules using configureRules:

import { configureRules } from "@helious/emotion-mirror";

configureRules({
    "unit-allowed-list": ["%", "px"],
    // Additional stylelint rules and/or overrides
    // ...
});

These are the default stylelint rules used:

Here is how you would disable any of the default stylelint rules:

import { configureRules } from "@helious/emotion-mirror";

configureRules({
    "annotation-no-unknown": null,
});

Example Output

This is what you can expect when using styled and there are issues in your component's styles:

Example Output

Production Mode

@helious/emotion-mirror is currently configured to only run Styled Components through stylelint when process.env.NODE_ENV is not set to "production". When process.env.NODE_ENV is "production", @helious/emotion-mirror's styled will fall back to using @emotion/react's styled.

Contributors

@helious/emotion-mirror is maintained by @helious and volunteers. Without the code contributions from all these fantastic people, @helious/emotion-mirror would not exist. Become a contributor.

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago