You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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()
andCLIEngine#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 forstandard.lintFiles(files, [opts], callback)
, i.e.opts.ignore
is supported.Or extend
results = standard.lintTextSync(text, [opts])
API to supportopts.ignore
: no linting ifopts.filename
is matched byopts.ignore
.The text was updated successfully, but these errors were encountered: