Skip to content

Commit a8a6b4a

Browse files
committed
Cleanup
1 parent be8884e commit a8a6b4a

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/transform/native.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const j = require('jscodeshift').withParser('ts');
22
const _debug = require('debug')('tagless-ember-components-codemod');
3-
const templateRecast = require('ember-template-recast');
43

54
const SilentError = require('../silent-error');
65
const {
@@ -16,8 +15,6 @@ const {
1615
isProperty,
1716
} = require('../utils/native');
1817

19-
const b = templateRecast.builders;
20-
2118
const EVENT_HANDLER_METHODS = [
2219
// Touch events
2320
'touchStart',
@@ -146,8 +143,9 @@ module.exports = function transformNativeComponent(root, options) {
146143
removeDecorator(root, classDeclaration, 'attributeBindings', '@ember-decorators/component');
147144
removeDecorator(root, classDeclaration, 'classNames', '@ember-decorators/component');
148145
removeDecorator(root, classDeclaration, 'classNameBindings', '@ember-decorators/component');
149-
j(classBody).find(j.ClassProperty).forEach(path => removeDecorator(root, path, 'attribute', '@ember-decorators/component'));
150-
146+
j(classBody)
147+
.find(j.ClassProperty)
148+
.forEach(path => removeDecorator(root, path, 'attribute', '@ember-decorators/component'));
151149

152150
let newSource = root.toSource();
153151

lib/utils/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function isDecorator(path, name, withArgs) {
2626
node.type === 'Decorator' &&
2727
((isCall && node.expression.callee.name === name) ||
2828
(!isCall && node.expression.name === name)) &&
29-
(withArgs === undefined || ((withArgs === true && isCall) || (withArgs === false && !isCall)))
29+
(withArgs === undefined || (withArgs === true && isCall) || (withArgs === false && !isCall))
3030
);
3131
}
3232

0 commit comments

Comments
 (0)