UB-Mannheim / zotkat

Erweiterung von Zotero für die Katalogisierung
GNU Affero General Public License v3.0
45 stars 22 forks source link

npm task to run sed + jshint, #13 #14

Closed kba closed 8 years ago

kba commented 8 years ago

This allows running npm run lint to run jshint on all translators.

kba commented 8 years ago

You could also replace the "test" task with the "lint", so e.g. Travis CI would pick this up and you can run npm test (4 keystrokes less than npm run lint! :wink:)

kba commented 8 years ago

BTW: Warum ist die boss Regel ausgeschaltet in der .jshintrc? if (foo == "bar") und if (foo = "bar") passiert schnell mal.

zuphilip commented 8 years ago

BTW: Warum ist die boss Regel ausgeschaltet in der .jshintrc?

Es ging hier um die Fälle der Art:

var item;
while (item = Zotero.nextItem()) {

was ihm standardmässig nicht gefällt. Die boss Option hat aber doch keine Änderung gebracht, daher habe ich dann den Klammer-Trick gemacht:

var item;
while ((item = Zotero.nextItem())) {

Somit brauchen wir aber die bossRegelung und damit auch die Einstellungsdatei nicht mehr. Magst Du dies gleich mit herausnehmen?

zuphilip commented 8 years ago

Merged mit neuer Squash-Funktion. Vielen Dank!