We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
this.element
1 parent 0d3a2ab commit c177ad9Copy full SHA for c177ad9
1 file changed
lib/index.js
@@ -95,7 +95,18 @@ async function runForPath(path, options = {}) {
95
96
debug(`${componentPath}: tagName detected: %o`, tagName);
97
98
- // TODO skip components that use `this.element` (warn)
+ // skip components that use `this.element`
99
+ let thisElementPaths = j(objectArg).find(j.MemberExpression, {
100
+ object: { type: 'ThisExpression' },
101
+ property: { name: 'element' },
102
+ });
103
+ if (thisElementPaths.length !== 0) {
104
+ console.log(
105
+ chalk.yellow(`${dimPath}: Using \`this.element\` is not supported in tagless components`)
106
+ );
107
+ continue;
108
+ }
109
+
110
// TODO skip components that use `click()` etc. (warn)
111
112
// TODO analyze `tagName`, `attributeBindings`, `classNames`, ...
0 commit comments