I could be wrong (may need some fiddling) but the udev rule should look something like this:
# Standard Espruino udev rule
ATTRS{idProduct}=="5740", ATTRS{idVendor}=="0483", ENV{ID_MM_DEVICE_IGNORE}="1", MODE="0666", GROUP="plugdev"
# Run stuff when it's plugged in
ACTION=="add",SUBSYSTEM=="tty",SUBSYSTEMS=="usb",ATTRS{idVendor}=="0483",ATTRS{idProduct}=="5740",RUN+="/home/your/script.sh /dev/%k"
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I could be wrong (may need some fiddling) but the udev rule should look something like this: