This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Core indent rule reports false positives in doc blocks #422
Closed
Description
What version of TypeScript are you using?
typescript@2.6.2
What version of typescript-eslint-parser
are you using?
typescript-eslint-parser@11.0.0
What code were you trying to parse?
/**
* This is a function.
* @param {String} text
* @returns {String}
*/
function foo(text: string): string {}
The minimal repro case is:
/**
* This is a function.
* @param {String} text
* @returns {String}
*/
function foo() {}
Running the autofixer generates the following code (which then passes):
/**
* This is a function.
{String} text
{String}
*/
function foo(text: string): string {}
What did you expect to happen?
No errors! This only occurs with the typescript-eslint-parser. It does not happen with the default parser.
What happened?
/Users/cataldo/Code/test/eslint-test/index.js
3:1 error Expected indentation of 0 spaces but found 3 indent
4:1 error Expected indentation of 0 spaces but found 3 indent
I'll try to look into the cause if I get a chance, but not sure if and when that'll be. Took the bug label off because I'm not sure what the established practice is in this repo - happy to update though :)