Skip to content

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

Open
@IPWright83

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions