Xo: Unexpected token t

Created on 14 May 2016  Â·  5Comments  Â·  Source: xojs/xo

async operations are suddenly failing that were previously not. Even my Travis builds are failing. Here is the line which fails (taken directly from del):

test('delete files - async', async t => {

To reproduce, I made my own coding an externality by downloading and running the tests for del.

$ git clone [email protected]:sindresorhus/del.git
$ npm install
$ npm test

  test.js:29:36
  ✖  29:36  Parsing error: Unexpected token t

  1 error

sist output:

OS

Darwin
x64

node

npm -v: 3.8.6
node --version: v5.11.0

shell

uname: Darwin
echo $SHELL: /bin/zsh
echo $TERM: xterm-256color
echo $TERM_PROGRAM: iTerm.app

Time created: Fri May 13 2016 22:16:05 GMT-0700 (PDT)

All 5 comments

This is caused by https://github.com/eslint/eslint/issues/6158.
There is already an open PR to fix the issue: https://github.com/eslint/eslint/pull/6160

Pin eslint to 2.9 until that is resolved. You can do that in package.json. Here is the updated package.json that makes the del example work.

  "devDependencies": {
   ...
    "xo": {
      "version": "*",
      "dependencies" : {
        "eslint": "2.9.x"
      }
    }
  }

@sindresorhus - do we want to cut a quick release pinning the eslint version? I think the eslint regression will be fixed pretty quick, but we are breaking builds right now.

Pinned in 0.15.1.

Should be fixed in 2.10.1.

Yup, I'm just giving it some days before upgrading ESLint again, in case it there were other bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iwata picture iwata  Â·  5Comments

sindresorhus picture sindresorhus  Â·  6Comments

sindresorhus picture sindresorhus  Â·  6Comments

lagden picture lagden  Â·  3Comments

sindresorhus picture sindresorhus  Â·  5Comments