-
-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: errors option #368
Comments
I'm a bit concerned that this would make it more difficult to write rules, because the rules would need to have a reasonable behavior for impossible ASTs. (For example, this could create other issues like eslint/eslint#7712.) |
Yes, you are right. |
@not-an-aardvark Is that necessarily the case? Could we instead augment |
We could do that. I was under the impression that the goal was to be able to run rules when there are non-fatal errors. |
You might be right. I was thinking that we could at least report multiple
parser errors, when they are "recoverable". We'll have to see what
@mysticatea thinks.
On Feb 24, 2018 13:11, "Teddy Katz" <[email protected]> wrote:
We could do that.I was under the impreaaion that the goal was to be able to
run rules when there are non-fatal errors.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#368 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AARWerKL6myPvL9tyCrxwnJepA-2pQLwks5tYFDNgaJpZM4SGEvs>
.
|
Purpose: There are recoverable errors in syntax error, e.g. duplicate names, invalid escapes in RegExp, and etc. ESLint stops all linting if it encountered those recoverable errors. However, ESLint should be able to work.
Proposal: Adds
errors
option to espree.acorn
reports errors bythis.raiseRecoverable()
method if the error is recoverable. If theerrors:true
option is given, espree collects recoverable errors intoast.errors
property instead of throwing exception.Then ESLint can report the
ast.errors
to users.The text was updated successfully, but these errors were encountered: