Skip to content

Commit 917e3cb

Browse files
committed
fix: @putout/operator-declare: rm unused check
1 parent 6c95ce7 commit 917e3cb

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

packages/operator-declare/lib/declare.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff 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-
125114
const 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))

0 commit comments

Comments
 (0)