ember-eslint-parser 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-eslint-parser",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -512,13 +512,29 @@ module.exports.convertAst = function convertAst(result, preprocessedResult, visi
512
512
  result.scopeManager.declaredVariables || result.scopeManager.__declaredVariables;
513
513
  const vars = [];
514
514
  declaredVariables.set(node, vars);
515
+ const virtualJSParentNode = {
516
+ type: 'FunctionDeclaration',
517
+ params: node.params,
518
+ range: node.range,
519
+ loc: node.loc,
520
+ parent: path.parent,
521
+ };
515
522
  for (const [i, b] of node.params.entries()) {
516
523
  const v = new Variable(b.name, scope);
517
524
  v.identifiers.push(b);
518
- v.defs.push(new Definition('Parameter', b, node, node, i, 'Block Param'));
519
525
  scope.variables.push(v);
520
526
  scope.set.set(b.name, v);
521
527
  vars.push(v);
528
+
529
+ const virtualJSNode = {
530
+ type: 'Identifier',
531
+ name: b.name,
532
+ range: b.range,
533
+ loc: b.loc,
534
+ parent: virtualJSParentNode,
535
+ };
536
+ v.defs.push(new Definition('Parameter', virtualJSNode, node, node, i, 'Block Param'));
537
+ v.defs.push(new Definition('Parameter', b, node, node, i, 'Block Param'));
522
538
  }
523
539
  }
524
540
  return null;