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

Enable parsing jsx files #30

Closed
kutnickclose opened this issue Aug 25, 2022 · 5 comments · Fixed by #31
Closed

Enable parsing jsx files #30

kutnickclose opened this issue Aug 25, 2022 · 5 comments · Fixed by #31

Comments

@kutnickclose
Copy link

Hello,

I am using postcss-lit as a custom syntax for stylelint but it bombs out trying to parse my jsx/tsx files. Could jsx be added to the babel parser?

// parse.ts
const ast = babelParse(sourceAsString, {
    sourceType: 'unambiguous',
    plugins: [
      'typescript',
      ['decorators', {decoratorsBeforeExport: true}],
+    'jsx'
    ],
    ranges: true
  });

Thanks,

Tim

@kutnickclose
Copy link
Author

Thanks!

@kutnickclose
Copy link
Author

Would it be possible to publish a new version?

@43081j
Copy link
Owner

43081j commented Aug 30, 2022

i have another bug i need to look at but after that, yes, ill publish a new version 👍

@kutnickclose
Copy link
Author

FYI,

To get stylelint plugin to work with jsx/tsx you'll need "javascriptreact", 'typescriptreact" in the stylelint.validate.

{
  "stylelint.validate": ["css", "javascript", "typescript", "javascriptreact", 'typescriptreact"]
}

@43081j
Copy link
Owner

43081j commented Sep 1, 2022

fyi have published 0.5.0

let me know if you run into any problems

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