Skip to content

Rule parity with TSLint core #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 23 tasks
JoshuaKGoldberg opened this issue Jan 8, 2019 · 10 comments
Closed
2 of 23 tasks

Rule parity with TSLint core #62

JoshuaKGoldberg opened this issue Jan 8, 2019 · 10 comments
Labels
enhancement: new plugin rule New rule request for eslint-plugin enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Jan 8, 2019

Spinning off of bradzacher/eslint-plugin-typescript#276: I'm a TSLint maintainer and would love to help get all the TSLint-exclusive rules available in ESLint. For each of these, would you accept a PR adding them in?

See the roadmap for an up-to-date listing

@j-f1
Copy link
Contributor

j-f1 commented Jan 8, 2019

@uniqueiniquity
Copy link
Contributor

@JoshuaKGoldberg I've been working through some of these in the process of trying to get the TypeScript repo onto ESLint. I have PRs up for a few and a few I'm still working out the details on, but I'd love some help with the rest, since I'm prioritizing the ones that TS has enabled.

@JamesHenry JamesHenry transferred this issue from bradzacher/eslint-plugin-typescript Jan 18, 2019
@armano2 armano2 added the package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin label Jan 18, 2019
@bradzacher bradzacher added enhancement New feature or request enhancement: new plugin rule New rule request for eslint-plugin labels Jan 18, 2019
@not-an-aardvark
Copy link
Contributor

I'm not at all familiar with the TSLint rule API, but would it be feasible to have a compatibility wrapper that generically converts TSLint rules to ESLint rules at runtime? That would avoid the effort of manually reimplementing TSLint rules as ESLint rules, both for this project and for custom rules.

In other words, it would be similar to eslint-plugin-tslint except that it would just invoke a single TSLint rule rather than invoking TSLint itself. This might have some performance benefits because it wouldn't be necessary to re-parse each file.

@JamesHenry
Copy link
Member

@not-an-aardvark We now reuse the ts SourceFile and Program via parserServices, so it shouldn't need to re-parse the file already

@JamesHenry
Copy link
Member

JamesHenry commented Jan 18, 2019

Definitely excited to explore more ideas around bridging/conversion though! Just wanted to point that out :)

@not-an-aardvark
Copy link
Contributor

We now reuse the ts SourceFile and Program via parserServices, so it shouldn't need to re-parse the file already

I see, I was confused because it's passing in the source text too, but I hadn't realized it was also passing in the parsed version.

@JamesHenry
Copy link
Member

You might well be right, I need to look into - thanks for following up!

@JamesHenry
Copy link
Member

@JoshuaKGoldberg Just to confirm, PRs definitely welcome! I think it would be good to use the existing ROADMAP.md as the source of truth for the progress of this, rather than the items in this issue, as it is more discoverable and under version control.

Thanks!

@fabb
Copy link

fabb commented Feb 9, 2019

Will/can rules that depend on compiler information be implemented in this bridge as well (e.g. the helpful no-unsafe-any)?

@bradzacher
Copy link
Member

@fabb here's a list of currently implemented rules that already use the parser services to do get type information.

https://github.com/search?utf8=%E2%9C%93&q=getParserServices+user%3Atypescript-eslint+repo%3Atypescript-eslint+path%3Apackages%2Feslint-plugin%2Flib%2Frules&type=Code&ref=advsearch&l=&l=

@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new plugin rule New rule request for eslint-plugin enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

8 participants