-
-
Notifications
You must be signed in to change notification settings - Fork 75
ESLint comment blocks will not work yet #5
Comments
This is expected right now because we are not yet including comments in the AST. I'll leave this open to track. |
@nzakas are you working on this issue or would accept PR on it ? I believe you already have started on it since this area is commented out
|
There's already an open PR that has some of the work done. Take a look. |
Update on this issue: It was decided that ESLint would be taking responsibility for attributing comment nodes. This project, and any other ESLint parsers, will only be responsible for identifying and converting the comment nodes for ESLint to then attach. Here is the relevant issue in ESLint: eslint/eslint#6724 I will leave this issue open until that work is complete so that it serves a reference for anyone else experiencing the issue |
ESLint 4.0.0-alpha.0 has been released and I can confirm that ESLint comments are working with TypeScript!!! 🎉 It can be installed using |
4.0.0 is now the stable version of ESLint and I am delighted to be able to close this issue 😄 https://github.com/eslint/eslint/releases/tag/v4.0.0 |
(Note: I am using ESLint via eslint-loader for webpack)
ESLint: 1.9.0
eslint-loader: 1.1.1
typescript-eslint-parser: 0.1.0-alpha-1
I have a codebase which was being transpiled with babel and being linted by eslint using the babel-parser.
After migrating the code to TypeScript and replacing the babel-parser with the typescript-eslint-parser, I have noticed that eslint comment blocks are no longer being respected.
Other than the
parser
option, no other changes were made to the .eslintrc during the migration.For example:
...used to produce no error or warning, but now shows:
error "d3" is not defined no-undef
The same is true for eslint-disable and eslint-enable comments:
Before introducing typescript-eslint-parser: no feedback from eslint
After introducing typescript-eslint-parser:
warning Unexpected alert no-alert
The text was updated successfully, but these errors were encountered: