xojs / SublimeLinter-contrib-xo

SublimeLinter plugin for XO
https://github.com/xojs/xo
MIT License
55 stars 7 forks source link

Errors don't get reported if there's a parsing error #19

Open IPWright83 opened 4 years ago

IPWright83 commented 4 years ago

I've found that despite xo working on the command line (and seen it working in other editors) if I introduce a syntax error then I get an ok report from xo in Sublime instead of an error.

Here's a small example:

const { test } = require("./test");

describe("test", () => {

    it("bad foo", () => {
        foo();
    });

    it("bad syntax", () => {
        await test();
    })
});

If you run this in a different editor (e.g. Atom) or via the command line it'll complain about line 10 having an await not inside an async function. I'd expect this to highlight as an error.

The result is it looks like the file is ok, however if you add the async back into the function declaration then you see there are actual errors that need fixing.