Skip to content

Commit

Permalink
Added Fix for no-explicit-any
Browse files Browse the repository at this point in the history
Fix error function
  • Loading branch information
aggmoulik committed Jun 11, 2019
1 parent 61e6385 commit a5b811a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/eslint-plugin/src/rules/no-explicit-any.ts
Expand Up @@ -9,6 +9,7 @@ export default util.createRule({
category: 'Best Practices',
recommended: 'warn',
},
fixable: "code",
messages: {
unexpectedAny: 'Unexpected any. Specify a different type.',
},
Expand All @@ -21,6 +22,9 @@ export default util.createRule({
context.report({
node,
messageId: 'unexpectedAny',
fix(fixer) {
fixer.replaceText(node,"unknown");
}
});
},
};
Expand Down

0 comments on commit a5b811a

Please sign in to comment.