Create a Drupal 8 module is a good idea, but develop as Drupal is BEST.
The famous tools PhpCS and PhpCBF allow you to check and correct (some) drupal coding standards and best practice errors.
Note : Following examples are tested on FireFox Version 52.
Method 1 . Press F12 and click on "Console"
Method 2 . Press Ctrl + Shift + K