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

multiline-comment-style fix produces invalid code #9461

epmatsw opened this Issue Oct 16, 2017 · 1 comment


None yet
3 participants

epmatsw commented Oct 16, 2017

Tell us about your environment

  • ESLint Version: 4.9.0
  • Node Version: 8.6.0
  • npm Version: 5.5.1

What parser (default, Babel-ESLint, etc.) are you using? default

Please show your full configuration:

    "parserOptions": {
        "ecmaVersion": 8,
        "sourceType": "script",
        "ecmaFeatures": {}
    "rules": {
        "multiline-comment-style": 2
    "env": {}

What did you do? Please include the actual source code causing the issue.


What did you expect to happen?
It should produce a valid comment after fixing.
What actually happened? Please include the actual, raw output from ESLint.
It produces:


In both eslint and a browser, this produces a parsing error: Parsing error: Unterminated regular expression (Fatal) and Exception: SyntaxError: unterminated regular expression literal respectively.

@eslintbot eslintbot added the triage label Oct 16, 2017

@Aladdin-ADD Aladdin-ADD added accepted bug rule and removed triage labels Oct 16, 2017


This comment has been minimized.

Show comment
Hide comment

Aladdin-ADD Oct 16, 2017


thanks for reporting, I can repro it!


Aladdin-ADD commented Oct 16, 2017

thanks for reporting, I can repro it!

@kaicataldo kaicataldo closed this in #9463 Oct 22, 2017

kaicataldo added a commit that referenced this issue Oct 22, 2017

Fix: multiline-comment-style fix produces invalid code (fixes #9461). (

* Fix: multiline-comment-style fix produces invalid code (fixes #9461).

* report error, not autofix.

@eslint eslint bot locked and limited conversation to collaborators Apr 21, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.