Xo: No support for babel-preset

Created on 10 Nov 2016  路  3Comments  路  Source: xojs/xo

After updating to the latest version of xo, several syntax errors are happening. I'm using _Babel_ with its presets, like support for _static properties_, but xo now is not able to parse them because the external _Babel_ support has been dropped. :broken_heart:

class Test {
  static cats = [] // Unexpected =
}

Well...
image

Most helpful comment

Adding a note somewhere in the README might be very useful to users.

https://github.com/xojs/xo#parser.

All 3 comments

It's documented in the release notes: https://github.com/sindresorhus/xo/releases/tag/v0.17.0

I removed it as it was buggy and made linting slower, and I only had it to get support for async/await, which is now supported in ESLint.

I agree with @haskellcamargo, it took me awhile to figure out that due to poor class properties syntax support, I had to manually install babel-eslint and config via "parser": "babel-eslint". I lost a couple of hours figuring this out.

Adding a note somewhere in the README might be very useful to users.

Adding a note somewhere in the README might be very useful to users.

https://github.com/xojs/xo#parser.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SteveALee picture SteveALee  路  5Comments

lagden picture lagden  路  3Comments

sindresorhus picture sindresorhus  路  6Comments

SamVerschueren picture SamVerschueren  路  4Comments

sindresorhus picture sindresorhus  路  8Comments