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

no-trailing-spaces doesn't report trailing spaces after block comments #12479

Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly rule Relates to ESLint's core rules

Comments

@mdjermanovic
Copy link
Member

Tell us about your environment

  • ESLint Version: 6.5.1
  • Node Version: 10.16.0
  • npm Version: 6.9.0

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

default

Please show your full configuration:

Configuration
module.exports = {
  parserOptions: {
    ecmaVersion: 2015,
  }
};

What did you do? Please include the actual source code causing the issue, as well as the command that you used to run ESLint.

Online Demo Link

/* eslint no-trailing-spaces: ["error", { ignoreComments: true }]*/

/*
    There are trailing spaces on the line where this comment ends.
*/         
eslint index.js

What did you expect to happen?

1 error because the option ignores just spaces in comments, not those after comments?

What actually happened? Please include the actual, raw output from ESLint.

No errors.

Are you willing to submit a pull request to fix this bug?

Yes.

I'm not sure if this is intended behavior? I think there are no tests to confirm this.

@mdjermanovic mdjermanovic added bug ESLint is working incorrectly triage An ESLint team member will look at this issue soon labels Oct 22, 2019
@platinumazure platinumazure added accepted There is consensus among the team that this change meets the criteria for inclusion rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Oct 22, 2019
@platinumazure
Copy link
Member

Thanks @mdjermanovic for the issue!

This seems like a pretty clear bug to me. I assume this fix will increase warnings in some cases, so it should be an Update.

@mdjermanovic
Copy link
Member Author

I'm working on this.

@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Apr 24, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.