Skip to content

Irrelevant linting errors on JSON files #6

Description

@nlydv

This has been something I've noticed occasionally whenever using the extension with an open JSON file:

Screen Shot 2022-06-17 at 9 30 04 PM

At first I though this was an issue from one of the JSON linting extensions I have installed, but it says it's from µEslint on hover.

Of course, my JSON is not actually missing a semicolon. I'm not using any extra eslint plugins that lint JSON files. Surprisingly, I ran eslint on the same file from the command line and it did give the same result.

Perhaps it would be beneficial to add an extension preference which allows the user to set a glob pattern or list of file types that it should lint exclusively. That way if someone wanted to lint JSON files (or any one of the numerous JS-derived files) using eslint, they could, and vice versa.

Even though this extension is meant to be simple, bare bones, and supposed behave as if you ran the eslint command manually, I think just this one user configurable option might be justified here since invoking the CLI naturally already involves passing such information as an argument anyways. May also help with performance for some.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions