File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
packages/operator-declare/lib Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -111,17 +111,6 @@ const fix = (declarations) => (path, {options}) => {
111111 addDeclarationForESLint ( name , path ) ;
112112} ;
113113
114- function isUseStrict ( path ) {
115- if ( ! path . isExpressionStatement ( ) )
116- return false ;
117-
118- const expressionPath = path . get ( 'expression' ) ;
119-
120- return expressionPath . isStringLiteral ( {
121- value : 'use strict' ,
122- } ) ;
123- }
124-
125114const parseCode = ( type , current ) => {
126115 if ( isString ( current ) )
127116 return current ;
@@ -157,7 +146,7 @@ function insert(node, bodyPath) {
157146 if ( isVariableDeclaration ( node ) )
158147 return first . insertBefore ( node ) ;
159148
160- if ( ! insertionPath && ! isUseStrict ( first ) )
149+ if ( ! insertionPath )
161150 return first . insertBefore ( node ) ;
162151
163152 if ( insertionPath . isImportDeclaration ( ) && isLocalImport ( insertionPath ) )
You can’t perform that action at this time.
0 commit comments