question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"semi-spacing" rule doesn't work after "while"

See original GitHub issue

Tell us about your environment

  • ESLint Version: 5.16.0
  • Node Version: 10.15.3
  • npm Version: 6.4.1

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

Please show your full configuration:

Configuration
{
  "env": {
    "es6": true,
    "node": true,
    "jasmine": true
  },
  "extends": "eslint:recommended",
  "parserOptions": {
  },
  "rules": {
    "semi-spacing": "error"
    "prefer-arrow-callback": "error",
    "no-else-return": "error",
    "no-multi-spaces": "error",
    "no-whitespace-before-property": "error",
    "camelcase": "error",
    "new-cap": "error",
    "no-console": "error",
    "comma-dangle": "error",
    "no-var": "error",
    "no-shadow": "error",
    "object-shorthand": [
      "error",
      "properties"
    ],
    "indent": [
      "error",
      4,
      {
        "SwitchCase": 1
      }
    ],
    "quotes": [
      "error",
      "single"
    ],
    "semi": [
      "error",
      "always"
    ]
  }
}

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

while (/*condition*/) ;
./node_modules/.bin/eslint ./lib

What did you expect to happen?

To error about the space between the end of while condition and ;, because of the "semi-spacing": "error" rule. This issue is specific to one-line (or empty) while statements.

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

It passes.

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

Maybe.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:23 (18 by maintainers)

github_iconTop GitHub Comments

1reaction
platinumazurecommented, Jul 7, 2019

@mysticatea You removed the “tsc agenda” label about a month ago but I don’t see any information here on what the TSC chose to do with this. Could you please add that information and then, if necessary, reopen this issue? Thanks!

1reaction
eslint-deprecated[bot]commented, Jul 7, 2019

Unfortunately, it looks like there wasn’t enough interest from the team or community to implement this change. While we wish we’d be able to accommodate everyone’s requests, we do need to prioritize. We’ve found that issues failing to reach accepted status after 21 days tend to never be accepted, and as such, we close those issues. This doesn’t mean the idea isn’t interesting or useful, just that it’s not something the team can commit to.

Thanks for contributing to ESLint and we appreciate your understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

semi-spacing - ESLint - Pluggable JavaScript Linter
Rule Details. This rule aims to enforce spacing around a semicolon. This rule prevents the use of spaces before a semicolon in expressions....
Read more >
"semi-spacing" doesn't work with "semi" · Issue #1983 - GitHub
I use the "semi" rule to forbid semicolons: "semi": [2, "never"] This style decision requires that you never start a line with (...
Read more >
Ask The Driving School Instructor: Two-Second Rule
Answer: The two-second rule is the rule most states have adopted to keep a safe following distance between your vehicle and the vehicle...
Read more >
Enable eslint "comma-spacing" and "semi" rules for PSM
comma-spacing enforces having spaces after commas (not before etc). semi enforces semicolons at the end of statements. :Cykesiopka.
Read more >
The 3-Second Rule When Driving. Do I Have to Follow It?
The three-second rule is based on the concept that braking distance is directly related to traveling speed. The faster a vehicle is moving,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found