Idea: extend capability of `extract-sequence-expressions` or applicable rule
See original GitHub issueOne class of sequence expressions missed by the extract-sequence-expressions
rule (or some other rule for this purpose) is when the sequence statements are tucked into an "if expression’. For example:
let a = true;
if(console.log('one'), console.log('two'), a) {
console.log('three')
}
This is equivalent and more clearly written as:
let a = true;
console.log('one');
console.log('two');
if (a) {
console.log('three')
}
Javascript returns the last expression in the sequence for evaluation in the “if expression”.
Issue Analytics
- State:
- Created 9 months ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Extract method | IntelliJ IDEA Documentation - JetBrains
The Extract Method refactoring lets you take a code fragment that can be grouped, move it into a separated method, and replace the...
Read more >FIE2: a program for the extraction of genomic DNA sequences ...
FIE2 (5′ end Information Extraction v2) is a web-based program for easy identification and extraction of nucleotide sequence around the start of genes ......
Read more >Keyword Extraction: A Guide to Finding Keywords in Text
Keyword extraction simplifies the task of finding relevant words and phrases within unstructured text. This includes emails, social media posts, chat ...
Read more >A survey of best practices for RNA-seq data analysis
RNA-sequencing (RNA-seq) has a wide variety of applications, but no single analysis pipeline can be used in all cases.
Read more >Using RegEx (Regular Expression Extractor) with JMeter
Another use case is saving the extracted information to a variable, so it can be used later on in the performance test, for...
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
It works well.
I’m going to write out some detailed bits so we have a good record of test overage, environment, versions.
Tested Versions
Test Project Metrics
Test Detection
94 errors in 50 files
Test Detail
Test 1:
Test 2:
BodyBlock
BodyBlock
if required, then hoists the sequence statements above leaving the condition“For Statement” example for clarity:
Is transformed into the more readable equivalent:
Landed in
@putout/plugin-extract-sequence-expressions@3.5.0
🎉. Is it works for you?