do not apply UnnecessaryBlock for the ECMAScript6 destructuring variable declarations

This commit is contained in:
Sashko
2024-02-21 22:19:53 +02:00
committed by GitHub
parent d23395a440
commit e5247d1703

View File

@ -225,10 +225,12 @@ be misleading. Considering removing this unnecessary Block.
<value>
<![CDATA[
//Block[not(parent::FunctionNode or parent::IfStatement or parent::ForLoop or parent::ForInLoop
or parent::WhileLoop or parent::DoLoop or parent::TryStatement or parent::CatchClause)]
or parent::WhileLoop or parent::DoLoop or parent::TryStatement or parent::CatchClause)
and not(ancestor::VariableDeclarator) and not(ancestor::ImportDeclaration)]
|
//Scope[not(parent::FunctionNode or parent::IfStatement or parent::ForLoop or parent::ForInLoop
or parent::WhileLoop or parent::DoLoop or parent::TryStatement or parent::CatchClause)]
or parent::WhileLoop or parent::DoLoop or parent::TryStatement or parent::CatchClause)
and not(ancestor::VariableDeclarator) and not(ancestor::ImportDeclaration)]
]]>
</value>
</property>