Created
December 2, 2019 01:47
-
-
Save whs/c4eab97dd5291a500d9cef0046533a0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default function({types: t}){ | |
| return { | |
| visitor: { | |
| CallExpression(path) { | |
| const node = path.node | |
| // เช็คว่าเป็น I18n.t จริง | |
| if ( | |
| !node.callee.object || | |
| node.callee.object.name !== 'I18n' || | |
| node.callee.property.name !== 't' | |
| ) { | |
| return | |
| } | |
| console.log('Found I18n.t!!') | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment