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

--stdin flag not working correctly with html plugin #1004

Closed
zhmars opened this issue Oct 18, 2017 · 4 comments

Comments

@zhmars
Copy link

commented Oct 18, 2017

I am using ale with this tool. ALE pass the --stdin flag to standard, but it's complaining about Parsing error when lint html file. ( js file is fine )

same issue was repored in dense-analysis/ale#1004

here is the test.html

<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <title>Test</title>
</head>

<body>
  <script>
    console.log("hello")
  </script>
</body>

</html>

image

@zanona

This comment has been minimized.

Copy link

commented Dec 15, 2017

+1: When the --stdin option is set standard parses the input as JSX rather than HTML.

@awmottaz

This comment has been minimized.

Copy link

commented Jan 24, 2018

I am also having these issues. I would appreciate any feedback on a workaround here, as I am trying to make SublimeLinter-contrib-standard work with .vue files.

Here is an example:

standard_stdin_bug

@stale

This comment has been minimized.

Copy link

commented May 10, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label May 10, 2018

@stale stale bot closed this May 17, 2018

@feross

This comment has been minimized.

Copy link
Member

commented May 20, 2018

Sorry that you're experiencing this issue. This also appears to be an issue with ESLint itself. I tested by running:

cat example.vue | npx eslint -c eslintrc.json --plugin html --stdin

And I got the same error message: "Parsing error: Adjacent JSX elements must be wrapped in an enclosing tag"

If you want to get it fixed, I suggest filing an issue and/or submitting a PR to the ESLint project.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 18, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
4 participants
You can’t perform that action at this time.