-
-
Notifications
You must be signed in to change notification settings - Fork 42
Description
What version of this package are you using?
14.3.1
What problem do you want to solve?
Standard provides results = standard.lintTextSync(text, [opts]) API. This is a convenient way for tools to interact with the linter, because there is no need to save a file to disk.
The problem is that this method doesn't check if the passed opts.filename is ignored. Also there is no dedicated method in API to check if a file is ignored.
For example, ESLint provides both CLIEngine#executeOnText() and CLIEngine#isPathIgnored().
What do you think is the correct solution to this problem?
A possible way is to mimic ESLint API and provide standard.isPathIgnored(filename, [opts])
where opts is the same as for standard.lintFiles(files, [opts], callback), i.e. opts.ignore is supported.
Or extend results = standard.lintTextSync(text, [opts]) API to support opts.ignore: no linting if opts.filename is matched by opts.ignore.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status