brunch / jshint-brunch

Adds JSHint linting support to Brunch.
7 stars 4 forks source link

Improve readability of report #13

Closed johann-sonntagbauer closed 9 years ago

johann-sonntagbauer commented 9 years ago

I tried to improve the reporter formatting a little bit by providing the error evidence to the output. My intention was to implement somehow the same format as the grunt-contrib-jshint plugin does it.

Some example output to make it more clear

25 Jan 01:48:48 - warn: Linting of app\js\loginApp.js: warn: JSHint detected 7 problems.

     10 |         .config(functio (CgmShellSecurityServiceProvider, CgmShellBackendUrlSetupProvider) {
                                                                                                     ^ Expected ')' and instead saw '{'.

     40 | })();
          ^ Expected '(end)' and instead saw '}'.

     10 |         .config(functio (CgmShellSecurityServiceProvider, CgmShellBackendUrlSetupProvider) {
                          ^ 'functio' is not defined.

     10 |         .config(functio (CgmShellSecurityServiceProvider, CgmShellBackendUrlSetupProvider) {
                                   ^ 'CgmShellSecurityServiceProvider' is not defined.

     10 |         .config(functio (CgmShellSecurityServiceProvider, CgmShellBackendUrlSetupProvider) {
                                                                    ^ 'CgmShellBackendUrlSetupProvider' is not defined.

     11 |             CgmShellBackendUrlSetupProvider
                      ^ 'CgmShellBackendUrlSetupProvider' is not defined.

     17 |             CgmShellSecurityServiceProvider.useImplementation('BasShellSecurityService');
                      ^ 'CgmShellSecurityServiceProvider' is not defined.

25 Jan 01:48:48 - warn: Linting of app\js\shellMainModule.js: warn: JSHint detected 1 problem.

     14 |             "hisSupport",
                                  ^ Strings must use singlequote.
es128 commented 9 years ago

Thanks!