Skip to content
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

Investigate adding compatibility for ESLint rules #517

Open
ajafff opened this issue Jan 7, 2019 · 4 comments
Open

Investigate adding compatibility for ESLint rules #517

ajafff opened this issue Jan 7, 2019 · 4 comments

Comments

@ajafff
Copy link
Member

ajafff commented Jan 7, 2019

The TypeScript team is moving towards ESLint because of its performance and obviously bigger ecosystem: microsoft/TypeScript#29288

This proposes a new plugin module that can load and execute ESLint rules.

Because of the completely different AST traversal it needs to be evaluated if that's even possible (without sacrificing performance too much).

This does not propose a plugin like @fimbul/valtyr that can completely emulate ESLint. This seems unnecessary as ESLint already works reasonably well on its own.

@karfau
Copy link

karfau commented Feb 20, 2019

Related news https://medium.com/palantir/tslint-in-2019-1a144c2317a9
(or maybe it's the same news in a different channel, not sure)

This does not propose a plugin like @fimbul/valtyr that can completely emulate ESLint. This seems unnecessary as ESLint already works reasonably well on its own.

Does the above mean that people that want to use ESLint will not be able to integrate their config into running wotan? So they would need to run two linters if they want to use thing available through wotan?

I think for more adoption it would be a good idea to provide tooling similar to valtyr.
This would make the switch for this tool from "a TSLint alternative" to "the pluggable linter that supports what you have and more".

Would be happy about any explaination of perspectives on this topic.

@ajafff
Copy link
Member Author

ajafff commented Feb 20, 2019

TSLint in 2019

Palantir abandoned TSLint about 2 years ago. I expect nothing to come from their end regarding the topics in the blog post. Instead they will rely on other contributors to get things done.
I'm hoping they deprecate TSLint sooner than later and don't encourage contributions for open issues in the meantime...


Does the above mean that people that want to use ESLint will not be able to integrate their config into running wotan?

Emulating the whole linter (cascading config, processors, .eslintignore, the actual linting, ...) is a bigger task than just loading and executing ESLint rules and displaying the results. This approach doesn't allow mixing rules from different linter engines in a single config (and therefore in a single execution of wotan).

What I had in mind was a plugin like @fimbul/heimdall that makes rules and formatters available in .wotanrc.yaml. At least that's what I want to start with.

Of course there could be a plugin to completely emulate ESLint. The only real benefit to executing eslint directly would be better support for TypeScript's tsconfig.json, semantic analysis using the TypeChecker, incremental parsing and faster updates after fixing.

@karfau
Copy link

karfau commented Feb 20, 2019

What I had in mind was a plugin like @fimbul/heimdall that makes rules and formatters available in .wotanrc.yaml. At least that's what I want to start with.

Thx for the clarification, sounds like a solid plan for me.

@ajafff
Copy link
Member Author

ajafff commented Aug 13, 2019

Probably required to correctly convert the AST: typescript-eslint/typescript-eslint#774

ajafff added a commit that referenced this issue Jan 19, 2021
@ajafff ajafff mentioned this issue Feb 14, 2021
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Stable Release
  
Evaluating
Development

No branches or pull requests

2 participants