Skip to content

Commit

Permalink
fix(strict-mutable): change meta type
Browse files Browse the repository at this point in the history
  • Loading branch information
d0whc3r committed Sep 15, 2019
1 parent 050b085 commit 440834e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rules/strict-mutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const rule: Rule.RuleModule = {
recommended: true
},
schema: [],
type: 'suggestion',
type: 'layout',
fixable: 'code'
},

Expand Down Expand Up @@ -63,7 +63,6 @@ const rule: Rule.RuleModule = {
return;
}
const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
const body = originalNode.body.getFullText();
const statements = originalNode.body.statements;
if (statements && statements.length) {
removeUsedVars(statements);
Expand All @@ -79,7 +78,7 @@ const rule: Rule.RuleModule = {
const text = originalNode.getFullText();
const parsed = parseDecorator(varNode);
context.report({
node: varNode,
node: varNode.key,
message: `@Prop() "${varName}" should not be mutable`,
fix(fixer) {
const options = parsed && parsed.length && parsed[0] || {};
Expand Down

0 comments on commit 440834e

Please sign in to comment.