Repository: ember-template-lint/ember-template-lint (js)

Issue:
Cannot read property '0' of undefined with Angle Brackets when passing @something={{false}}
I have the following code snippet:

```hbs
<PowerSelect
  @selected={{@pageSize}}
  @options={{this.availablePageSizes}}
  @searchEnabled={{false}}
  @onchange={{action this.changePageSize}} as |size|>
  {{size}}
</PowerSelect>
```
And then I get the following error from template lint:

```
  -:-  error  Cannot read property '0' of undefined  undefined
```

If I remove `@searchEnabled={{false}}` I don't get any errors.


Pull request description:
Fix issues with `{{false}}` in deprecation related rules.
These rules expected that all `MustacheStatement`s would have a `PathExpression` as their `node.path` and therefore called `node.path.parts[0]` directly.

Unfortunately, that is not a valid assumption to make as `node.path` on a `MustacheStatement` could be many other things as well (e.g. literals).

Fixes #443

Patch:
diff --git a/lib/rules/deprecations/lint-deprecated-inline-view-helper.js b/lib/rules/deprecations/lint-deprecated-inline-view-helper.js
index 12c170e0..a89e1654 100644
--- a/lib/rules/deprecations/lint-deprecated-inline-view-helper.js
+++ b/lib/rules/deprecations/lint-deprecated-inline-view-helper.js
@@ -74,7 +74,7 @@ module.exports = class DeprecatedInlineViewHelper extends Rule {
         // this MustachStatement was already processed by ElementNode
         if (node._processedByInlineViewHelper === true) { return; }
 
-        if (node.path.parts[0] === 'view') {
+        if (node.path.type === 'PathExpression' && node.path.parts[0] === 'view') {
           if (node.params.length === 1) {
             this.processWithArgument(node);
           } else if (node.loc.start.line !== null) {
diff --git a/lib/rules/deprecations/lint-deprecated-render-helper.js b/lib/rules/deprecations/lint-deprecated-render-helper.js
index a95eae39..27168917 100644
--- a/lib/rules/deprecations/lint-deprecated-render-helper.js
+++ b/lib/rules/deprecations/lint-deprecated-render-helper.js
@@ -22,7 +22,7 @@ module.exports = class DeprecatedRenderHelper extends Rule {
   visitor() {
     return {
       MustacheStatement(node) {
-        if (node.path.parts[0] === 'render') {
+        if (node.path.type === 'PathExpression' && node.path.parts[0] === 'render') {
           if (node.params.length === 1) {
             this.processWithOneArgument(node);
           } else if (node.params.length === 2) {


Test patch:
diff --git a/test/unit/recommended-config-test.js b/test/unit/recommended-config-test.js
index 5768a750..271ca408 100644
--- a/test/unit/recommended-config-test.js
+++ b/test/unit/recommended-config-test.js
@@ -40,4 +40,14 @@ describe('recommended config', function() {
 
   // This ensures that we don't face this issue again => https://github.com/rwjblue/ember-template-lint/issues/253
   ensureValid('<img alt="special thing" src={{some-dir/some-thing x}}>');
+
+  // This ensures that we don't face this issue again => https://github.com/rwjblue/ember-template-lint/issues/443
+  ensureValid(`
+<PowerSelect
+  @selected={{@pageSize}}
+  @options={{this.availablePageSizes}}
+  @searchEnabled={{false}}
+  @onchange={{action this.changePageSize}} as |size|>
+  {{size}}
+</PowerSelect>`);
 });
diff --git a/test/unit/rules/deprecations/lint-deprecated-inline-view-helper-test.js b/test/unit/rules/deprecations/lint-deprecated-inline-view-helper-test.js
index 582fa44c..cd571898 100644
--- a/test/unit/rules/deprecations/lint-deprecated-inline-view-helper-test.js
+++ b/test/unit/rules/deprecations/lint-deprecated-inline-view-helper-test.js
@@ -14,7 +14,12 @@ generateRuleTests({
   good: [
     '{{great-fishsticks}}',
     '{{input placeholder=(t "email") value=email}}',
-    '{{title "CrossCheck Web" prepend=true separator=" | "}}'
+    '{{title "CrossCheck Web" prepend=true separator=" | "}}',
+    '{{false}}',
+    '{{"foo"}}',
+    '{{42}}',
+    '{{null}}',
+    '{{undefined}}',
   ],
 
   bad: [
diff --git a/test/unit/rules/deprecations/lint-deprecated-render-helper-test.js b/test/unit/rules/deprecations/lint-deprecated-render-helper-test.js
index dfeef9a1..7566443d 100644
--- a/test/unit/rules/deprecations/lint-deprecated-render-helper-test.js
+++ b/test/unit/rules/deprecations/lint-deprecated-render-helper-test.js
@@ -13,7 +13,12 @@ generateRuleTests({
     '{{valid-compoennt}}',
     '{{input placeholder=(t "email") value=email}}',
     '{{title "CrossCheck Web" prepent=true separator=" | "}}',
-    '{{hockey-player teamName="Boston Bruins"}}'
+    '{{hockey-player teamName="Boston Bruins"}}',
+    '{{false}}',
+    '{{"foo"}}',
+    '{{42}}',
+    '{{null}}',
+    '{{undefined}}',
   ],
 
   bad: [