'no-unsafe-finally' rule gives errors on safe code
See original GitHub issueWhat version of ESLint are you using? eslint@e606523
What parser (default, Babel-ESLint, etc.) are you using? default
What did you do? Please include the actual source code causing the issue.
Rule no-unsafe-finally
gives an error on the following code:
try {} finally {
while(true) {
break;
}
}
What did you expect to happen? No errors.
What actually happened? Please include the actual, raw output from ESLint.
Unsafe usage of BreakStatement no-unsafe-finally
More generally, break and continue statements need to check that the statement being broken or continued is not interior to the finally block. This involves checking labels, if present.
ping @onurtemizkan, @platinumazure.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
eslint-config-nicestyle - npm package - Snyk
This config is midly strict and you can overwrite or add rule if you want. ... no-unsafe-finally, error ... Is eslint-config-nicestyle safe to...
Read more >Code Issues - Embold Help Center
The section below briefs you about the bugs, vulnerabilities, and code issues ... we have created our own checks and rules to discover...
Read more >Rule overview - Deno
Warns the usage of unknown rule codes in ignore directives. We sometimes have to suppress and ignore lint errors for some reasons. We...
Read more >FAQ Section - MESA Safe Company
If the safe gives you E-code that means the incorrect code is being entered into the safe and you will need to use...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... These rules relate to possible logic errors in code:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@louy, that one’s handled correctly.
Easiest way to test it yourself is to clone master,
npm install
, then./bin/eslint.js --no-eslintrc --rule 'no-unsafe-finally: 1' test.js
.Oh, good catch!