Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

JSDoc comments break indent #344

Closed
j-f1 opened this issue Aug 5, 2017 · 10 comments
Closed

JSDoc comments break indent #344

j-f1 opened this issue Aug 5, 2017 · 10 comments

Comments

@j-f1
Copy link
Contributor

j-f1 commented Aug 5, 2017

What version of TypeScript are you using?
2.3.4

What version of typescript-eslint-parser are you using?
4.0.0

What code were you trying to parse?

/**
 * @a
 */
foo;

This code also breaks:

/**
 * @a
 */
/**
 * a
 */
foo;

What did you expect to happen?
No errors

What happened?

Expected indentation of 0 spaces but found 1. (indent)

None of these throw the error:

/**
 * a
 */
foo;
/**
 * @a
 */
/**
 * @a
 */
@w0rp
Copy link

w0rp commented Aug 15, 2017

I've been seeing this issue myself in my codebase. In some cases, we were able to disable the errors by using /*** for comments, so they won't be recognised as jsdoc comments, or by wrapping the jsdoc comments in eslint comments to disable the rule for those lines.

@JamesHenry
Copy link
Member

I haven't had chance to dig into this at all yet, but it's possible you can use the new functionality in the indent rule to work around this: eslint/eslint#8594

@bradzacher
Copy link

what's the status of this? it's producing a lot of erroneous linting errors across my codebase.

@sarvaje
Copy link

sarvaje commented Oct 4, 2017

@bradzacher if it is an option for you, you can use the rule indent-legacy until this issue is fixed

@JamesHenry
Copy link
Member

Thanks for providing the alternative workaround, @sarvaje.

I am going to try and come up with a solution for this "integration" issue.

@JamesHenry
Copy link
Member

I can no longer reproduce this issue with the latest dependencies involved. Please feel free to reopen if it is still an issue.

@Tarnadas
Copy link

Tarnadas commented Jan 17, 2018

It's still not resolved for me.

These are my dependencies:

    "typescript": "^2.6.2",
    "typescript-eslint-parser": "^12.0.0",
    "eslint": "4.15.0"

@bkotos
Copy link

bkotos commented Jan 17, 2018

This is not resolved for me either. Having the latest typescript-eslint-parser doesn't fix it.
My relevant dependencies:

    "typescript": "^2.6.1",
    "typescript-eslint-parser": "^12.0.0",
    "eslint": "^4.14.0",

@stanbluijs
Copy link

Having the same issue, is there any update on this?

"typescript": "^2.6.2",
"typescript-eslint-parser": "^12.0.0",
"eslint": "^4.16.0"

@benedictchen
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants