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

strange behaviour with space-after-keywords #2847

Closed
alexander-akait opened this issue Jun 26, 2015 · 3 comments · Fixed by DavidKindler/meteor#3
Closed

strange behaviour with space-after-keywords #2847

alexander-akait opened this issue Jun 26, 2015 · 3 comments · Fixed by DavidKindler/meteor#3
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

@alexander-akait
Copy link

function setSomeValue() {
        var someValue = 10;
        var getSomeValue = function () {
            return someValue;
        };

        do {
            someValue--;
        } while ((someValue = getSomeValue));
}

setSomeValue();

Config for rule

"space-after-keywords": [
    2,
    "always"
],

I get error ESLint: Keyword "(" must be followed by whitespace. (space-after-keywords)

@michaelficarra
Copy link
Member

On which line? I'm sure you can reduce the repro case more than what you've given us.

@alexander-akait
Copy link
Author

@michaelficarra

do { // <<< Error on line
    someValue--;
} while ((someValue = getSomeValue));

@lo1tuma lo1tuma added bug ESLint is working incorrectly rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion labels Jun 26, 2015
@lo1tuma
Copy link
Member

lo1tuma commented Jun 26, 2015

I can reproduce this with the online demo.

ilyavolodin added a commit that referenced this issue Jun 26, 2015
Fix: space-after-keywords should ignore extra parens (fixes #2847)
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 7, 2018
@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 Feb 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants