0.0.23 • Published 4 years ago

eslint-plugin-pretty-lights v0.0.23

Weekly downloads
2,483
License
Apache-2.0
Repository
github
Last release
4 years ago

Pretty Lights ESLint Plugin

  • pretty-lights/no-emotion

If you are using Prettier in your editor, or you run eslint . --fix against a project, your import statements will automatically be converted from emotion / react-emotion / emotion-server / emotion-theming to pretty-lights. You may need to manually intervene in a few instances, but I was able to convert the lion's share of the NYT codebase using the ESLint fix.

  • pretty-lights/no-css-prop

The css prop, the bread and butter of Emotion 10, is an antipattern in the NYT codebase, and pretty-lights completely removes its existence. However, it is still a good idea to avoid naming a prop, css. This rule ensures that you do not.

  • pretty-lights/favor-css-over-styled

If you create a styled component using the styled.h1 syntax and don't use any interpolations, this rule will nag you to use css instead of styled. This has been an implicit rule in our codebase anyways, but only enforced by those who know about it, and most people have only heard about it through folklore.

  • pretty-lights/disambiguate-vars

This rule tries to enforce the convention of ending all variables tied to css calls with "Class" (e.g. const headerClass = css..)

0.0.23

4 years ago

0.0.21

4 years ago

0.0.22

4 years ago

0.0.20

4 years ago

0.0.20-alpha.0

4 years ago

0.0.18

5 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago