gucong3000 / postcss-jsx

PostCSS syntax for parsing CSS in JS literals
MIT License
76 stars 28 forks source link

Handle object shorthand #67

Closed BPScott closed 4 years ago

BPScott commented 4 years ago

Objects that use the shorthand notation should be stringified as such.

This stops <div style={{color}} /> being converted to <div style={{color:color}} />.

This fixes https://github.com/stylelint/stylelint/issues/4449 / https://github.com/stylelint/stylelint/issues/4485

codecov[bot] commented 4 years ago

Codecov Report

Merging #67 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #67   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          20     20           
  Lines         477    480    +3     
=====================================
+ Hits          477    480    +3
Impacted Files Coverage Δ
object-stringifier.js 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e318894...1517423. Read the comment docs.

alexander-akait commented 4 years ago

/cc @gucong3000

BPScott commented 4 years ago

Thanks for the merge @gucong3000.

@gucong3000 / @ai: Any chance of releasing a new version so we can get this fix into stylelint?

ai commented 4 years ago

@BPScott I will try to release it a week later when I will finish mu bachelor’s party

ai commented 4 years ago

https://github.com/gucong3000/postcss-jsx/pull/68

Release in process (waiting for codecov to merge release commit).

ai commented 4 years ago

@BPScott released in 0.36.4.

PostCSS now has an open collective. I can switch from my current open-source projects to a long-term solution for postcss-jsx maintenance if some company will donate for it.