Skip to content

Commit

Permalink
feat: add prefer-ideal-image eslint rule
Browse files Browse the repository at this point in the history
Signed-off-by: Devansu <devansuyadav@gmail.com>
  • Loading branch information
Devansu-Yadav committed Mar 25, 2023
1 parent 686311b commit 678f850
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/eslint-plugin/src/rules/prefer-ideal-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export default createRule<Options, MessageIds>({
JSXOpeningElement(node) {
const elementName = (node.name as TSESTree.JSXIdentifier).name;

console.log(elementName);
if (elementName !== 'img') {
return;
}

context.report({node, messageId: 'image'});
},
};
Expand Down

0 comments on commit 678f850

Please sign in to comment.