Xo: Built-in support for TypeScript

Created on 21 Jan 2019  路  6Comments  路  Source: xojs/xo


Issuehunt badges

Now that the TypeScript project is officially committed to using and supporting ESLint, I would like to explore adding built-in support for TypeScript in XO. You can already use TypeScript with XO, but I would like to make it just work.

I have already updated the shareable TS config for the new plugin: https://github.com/xojs/eslint-config-xo-typescript/commit/1161b418bebab5511d8dddf4cba98a71bb1311e5

XO will add TypeScript and the TypeScript ESLint plugin as a dependency.

We still need to discuss how it will exactly work. Can we manage to do it without any setting?

Note to self: Should lint foo.d.ts (TS definition files) in non-TS projects automatically.


This issue requires you to have extensive JS knowledge. It's not an easy issue. Only undertake it if you are confident you can handle it and you intend to see it through.




IssueHunt Summary

pvdlg pvdlg has been rewarded.

Backers (Total: $200.00)

Submitted pull Requests

- #426 Add TypeScript support

Tips

IssueHunt has been backed by the following sponsors. Become a sponsor


Rewarded on Issuehunt enhancement help wanted

Most helpful comment

I'll start working on this issue soon. I need to experiment but I think I can make it work without an option.
Every .ts/.tsx would be linted with the xo config + the config from eslint-config-xo-typescript

All 6 comments

You can apply those rules to *.ts,*.tsx files specifically. One caveat is that the parser warns pretty aggressively when your TypeScript version is newer. It's all still rather finicky.

@issuehunt has funded $200.00 to this issue.


How is the status of this issue? Anything we can do to help?

I'll start working on this issue soon. I need to experiment but I think I can make it work without an option.
Every .ts/.tsx would be linted with the xo config + the config from eslint-config-xo-typescript

@sindresorhus has rewarded $180.00 to @pvdlg. See it on IssueHunt

  • :moneybag: Total deposit: $200.00
  • :tada: Repository reward(0%): $0.00
  • :wrench: Service fee(10%): $20.00

馃尞

XO is working great with TypeScript now!

I was able to drop a lot of config and workarounds for the parserOptions.project issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EdJoPaTo picture EdJoPaTo  路  3Comments

SteveALee picture SteveALee  路  5Comments

Igor-Scekic picture Igor-Scekic  路  3Comments

sindresorhus picture sindresorhus  路  8Comments

niftylettuce picture niftylettuce  路  6Comments