Closed
Description
Environment
Node version: v19.0.1
npm version: v8.19.2
Local ESLint version: v8.43.0
Global ESLint version: Not found
Operating System: win32 10.0.22621
What parser are you using?
Default (Espree)
What did you do?
Configuration
"rules": {
"curly": ["error", "multi"],
"indent": ["error", "tab"],
}
const foo = true, bar = true, doSomething = () => { };
if (foo)
if (bar) doSomething();
else doSomething();
else
if (bar) doSomething();
else doSomething();
What did you expect to happen?
The demo code is correct and does not require to fix.
What actually happened?
The else
part indents marked as error.
if (foo)
if (bar) doSomething();
else doSomething();
else
﹏﹏﹏﹏ if (bar) doSomething();
﹏﹏﹏﹏ else doSomething();
Problem content:
Expected indentation of 0 tabs but found 1. eslint(indent)
After fix all auto-fixable problems
if (foo)
if (bar) doSomething();
else doSomething();
else
if (bar) doSomething();
else doSomething();
Link to Minimal Reproducible Example
https://stackblitz.com/edit/js-efzdhw?file=index.js&view=editor
Participation
- I am willing to submit a pull request for this issue.
Additional comments
No response
Metadata
Assignees
Labels
Type
Projects
Status
Complete