-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
HacktoberfestRecommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/Recommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlycoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featureshelp wantedThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issue
Description
Noticed this while working on #12259
sourceCode.isSpaceBetweenTokens()
sees newlines inside multiline block comments as spaces.
Observable:
/* eslint space-before-function-paren:["error", "never"]*/
function foo/*
*/(){}
The above is an error because of the newline (function foo/* */(){}
is not an error for the same rule.)
Is it intentional or a bug?
There is no such test for isSpaceBetweenTokens()
in source-code
tests.
Also, when I add the s
flag to the /\/\*.*?\*\//gu
regex in isSpaceBetweenTokens
and run npm test
everything still works.
kaicataldo, platinumazure and mysticatea
Metadata
Metadata
Assignees
Labels
HacktoberfestRecommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/Recommended issue for those participating in Hacktoberfest https://hacktoberfest.digitalocean.com/acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionbugESLint is working incorrectlyESLint is working incorrectlycoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and featureshelp wantedThe team would welcome a contribution from the community for this issueThe team would welcome a contribution from the community for this issue