Xo: Impossible rules

Created on 17 Apr 2016  路  8Comments  路  Source: xojs/xo

I thought I'd collect some rules I'd like to see that are impossible with the current ESLint. For posterity.

Comment on other things that would be cool if ESLint didn't have its current limits.

question

Most helpful comment

Writing rules targeted at TypeScript and taking advantage of its type information would solve many of these problems.

https://twitter.com/sindresorhus/status/1089602422236864512

All 8 comments

Wonder if we could integrate Tern.js into ESLint somehow or maybe compile Flow into Asm.js/WebAssembly.

Flow can already be compiled to JavaScript, that's how we run in the browser (https://flowtype.org/try/), if you want to experiment with doing eslint rules that consume Flow I can help you out with that.

I suspect it will be slower than you want because Flow is more meant for incremental checks with a server running in the background. Where eslint can get away with starting up cold. It's not _that_ slow, but you will notice the difference.

That'd be really awesome! I'd love to work on that!

Added it to my team's backlog.

Writing rules targeted at TypeScript and taking advantage of its type information would solve many of these problems.

https://twitter.com/sindresorhus/status/1089602422236864512

I'm playing around with the new Typescript eslint parser, and I think I'd like to try my hand at a POC implementation of some of these. Will still have to ignore non or untyped nodes, but I think many of these are possible now with @typescript-eslint

@RichiCoder1 Awesome! 馃憤

I would be happy to host them over at eslint-plugin-unicorn if you want.

https://github.com/typescript-eslint/typescript-eslint/issues/283

https://github.com/typescript-eslint/typescript-eslint/issues/284

https://github.com/typescript-eslint/typescript-eslint/issues/285

Was this page helpful?
0 / 5 - 0 ratings