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

Chore: Update README with list of known issues #247

Merged
merged 2 commits into from
May 6, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 26 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# TypeScript ESLint Parser (Experimental)

A parser that converts TypeScript into an [ESTree](https://github.com/estree/estree)-compatible form so it can be used in ESLint. The goal is to allow TypeScript files to be parsed by ESLint (though not necessarily pass all ESLint rules).
A parser that converts TypeScript into an [ESTree](https://github.com/estree/estree)-compatible form so it can be used in ESLint.

**Important:** This parser is still in the very early stages and is considered experimental. There are likely a lot of bugs. You should not rely on this in a production environment yet.
**Important:** This parser is not fully compatbile with all ESLint rules and plugins. Some rules will improperly mark source code as failing or not find problems where it should.

## Supported TypeScript Version

Expand All @@ -14,6 +14,23 @@ If you use a non-supported version of TypeScript, the parser will log a warning

**Please ensure that you are using a supported version before submitting any issues/bug reports.**

## Known Issues

The following ESLint rules will fail on acceptable code:
- no-undef [#77](https://github.com/eslint/typescript-eslint-parser/issues/77)
- no-unused-vars [#77](https://github.com/eslint/typescript-eslint-parser/issues/77)
- no-useless-constructor [#77](https://github.com/eslint/typescript-eslint-parser/issues/77)
- space-infix-ops [#224](https://github.com/eslint/typescript-eslint-parser/issues/224)

The follow ESLint plugins have issues when used with this parser:
- eslint-plugin-react [#213](https://github.com/eslint/typescript-eslint-parser/issues/213)

The following TypeScript syntax will cause rules to fail or ESLint v3 to crash:
- Empty body functions
- Abstract methods
- Multiple function declarations
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this referring to function overloads?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes function overloading. I can change the name to be more clear.

I'm going to write up an issue for this problem. I think we might be able to come up with a better solution than the one I have proposed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#253 Summarizes the current situation and the three PR's I created to fix this issue.

- Declared functions

## Usage

Install:
Expand All @@ -34,12 +51,13 @@ If you're familiar with TypeScript and ESLint, and you'd like to see this projec

## Reporting Bugs

**Do not** file bugs about ESLint rule failures. This is expected because ESLint doesn't know anything about TypeScript syntax. It's likely that many ESLint rules will have failures as a result. Longer-term, it's likely we'll need to create a custom set of ESLint rules that are TypeScript-specific.

Bugs should be filed for:

1. TypeScript syntax that fails to parse.
1. TypeScript syntax that produces an unexpected AST.
Please check the current list of open and known issues and ensure the bug has not been reported before. When creating a new issue provide as much information about your enviroment as possible. This includes:
- ESLint Version
- TypeScript version
- TypeScript parser version
- ESLint config or rules and plugins currently enabled

As well include a small code sample that can be used to reproduce the issue.

## Contributing

Expand Down