Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unknown word" syntax error for multiline arrow function #49

Closed
hudochenkov opened this issue Mar 15, 2019 · 1 comment
Closed

"Unknown word" syntax error for multiline arrow function #49

hudochenkov opened this issue Mar 15, 2019 · 1 comment

Comments

@hudochenkov
Copy link
Contributor

hudochenkov commented Mar 15, 2019

When using a multiline arrow function "Unknown word" error is thrown.

I'm using the latest stylelint@9.10.1 which uses postcss-jsx@0.36.0:

> stylelint "**/*.styled.js"

Button.styled.js
 8:3  ✖  Unknown word   CssSyntaxError
import { css } from 'styled-components';

export const buttonStyles = css`
  border-radius: 4px;

  cursor: pointer;

  ${(props) => {
    return props.small && 'padding: 30px;';
  }}
`;

This issue is similar to gucong3000/postcss-styled#37.

@samuelkraft
Copy link

Same error for me when using code like this:

import { css } from '@emotion/core'

const text = active => css`
  color: red;

  ${active &&
    css`
      color: green;
    `
   }
`

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

Successfully merging a pull request may close this issue.

2 participants