Skip to content
This repository has been archived by the owner on May 14, 2021. It is now read-only.

No linting inside styled-is and media mixin #207

Open
karolisgrinkevicius opened this issue Jul 30, 2018 · 1 comment
Open

No linting inside styled-is and media mixin #207

karolisgrinkevicius opened this issue Jul 30, 2018 · 1 comment

Comments

@karolisgrinkevicius
Copy link

karolisgrinkevicius commented Jul 30, 2018

Hi. Not sure this issue might belong to stylelint-processor-styled-components but in fact linter ignores css within styled-is and media mixins described here.

Please see the code snippet below which represents the parts that not working against linter even though configuration is setup correctly and works well if NOT wrapped into media mixin or styled-is:

import styled from 'styled-components';
import is from 'styled-is';
import { media } from 'utils/media';

export const MyStyledComponent = styled.div`
  nonExistingProperty: 'nonExistingValue'; /* Works! ✅ */

  ${is('active')`
    nonExistingProperty: 'nonExistingValue'; /* Doesn't work! 🚫 */
  `};
  
  ${media.sm`
    nonExistingProperty: 'nonExistingValue'; /* Doesn't work! 🚫 */
  `};
`;

screen shot 2018-07-30 at 14 55 23

Used dependencies

  • stylelint 9.4.0
  • stylelint-processor-styled-components 1.3.2
  • styled-components 3.3.3
  • styled-is 1.1.3
@chinesedfan
Copy link
Member

Please refer to #182. It is hard to lint interpolations now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants