stylelint-processor-styled-components icon indicating copy to clipboard operation
stylelint-processor-styled-components copied to clipboard

Deprecated package

Open alexander-akait opened this issue 6 years ago • 10 comments

Stylelint support css-in-js out of box, so no need use this plugin, will be great deprecate this

alexander-akait avatar Aug 28 '19 12:08 alexander-akait

@evilebottnawi Can you provide more details about it? Is it due to some new features introduced by the latest stylelint?

chinesedfan avatar Aug 28 '19 13:08 chinesedfan

@chinesedfan it is built-in feature since 10 version https://github.com/stylelint/stylelint#features

alexander-akait avatar Aug 28 '19 13:08 alexander-akait

@evilebottnawi Looks good. Thanks for your information. I will play it more before giving a final decision. (cc @emilgoldsmith @mxstbr)

chinesedfan avatar Aug 28 '19 13:08 chinesedfan

Awesome to hear :)

emilgoldsmith avatar Aug 28 '19 15:08 emilgoldsmith

I was out of the world of stylelint too long. According to stylelint's CHANGLOG,

  • v9.4, introduced syntax: styled to support css-in-js, which was based on postcss-styled
  • v9.10, replaced postcss-styled with the more powerful postcss-jsx and changed the option as syntax: css-in-js
  • v10.0, removed the deprecated syntax: styled completely

After read some codes of postcss-jsx, I think it is the better way to lint styled-components files, even thought it still has lots of differences with this processor. Because it analyzes the whole AST more completely and can give more accurate replacements for tagged template interpolations. In later days, I will open issues for postcss-jsx to make this processor's abilities be 100% migrated smoothly.

chinesedfan avatar Aug 29 '19 12:08 chinesedfan

I think that's a great idea

mxstbr avatar Aug 29 '19 12:08 mxstbr

@chinesedfan friendly ping, what is status?

alexander-akait avatar Sep 16 '19 11:09 alexander-akait

@evilebottnawi I have opened gucong3000/postcss-jsx#62. But not sure when @gucong3000 or somebody else has time to solve them.

chinesedfan avatar Sep 16 '19 12:09 chinesedfan

Thanks!

alexander-akait avatar Sep 16 '19 12:09 alexander-akait

What's the current status of this project?

styled-components recommends using this for stylelint, so many developers would think that using this processor with stylelint is an official way to use stylelint with styled-components. https://styled-components.com/docs/tooling#stylelint

But this still uses the old version of Babel, so we cannot use new ES syntaxes and TypeScript syntaxes with this processor. https://github.com/styled-components/stylelint-processor-styled-components/pull/296

This is a pitfall to combined styled-components and stylelint, so I think deprecating this package is an important message for developers.

I think styled-components updates the document, but it's an another issue. https://github.com/styled-components/styled-components-website/issues/671

koba04 avatar Oct 01 '20 12:10 koba04