Merge pull request #1192 from Slayer95/lint

Gulpfile: check for ES3 issues in data files
This commit is contained in:
Guangcong Luo 2014-09-04 14:21:52 -05:00
commit b8f734edc6
11 changed files with 24 additions and 21 deletions

View File

@ -331,7 +331,7 @@ var commands = exports.commands = {
} else if (newTargets[0].searchType === 'move') {
var move = Tools.getMove(newTargets[0].name);
details = {
"Priority": move.priority,
"Priority": move.priority
};
if (move.secondary || move.secondaries) details["<font color=black>&#10003; Secondary Effect</font>"] = "";
@ -1727,6 +1727,6 @@ var commands = exports.commands = {
} else if (!matched) {
this.sendReply("Help for the command '" + target + "' was not found. Try /help for general help");
}
},
}
};

View File

@ -47,8 +47,9 @@ var jsHintOptions = {
}
};
gulp.task('lint', function () {
var directories = ['./*.js', './data/*.js', './mods/*/*.js', './tournaments/*.js', './chat-plugins/*.js', './config/*.js'];
gulp.task('data', function () {
var directories = ['./data/*.js', './mods/*/*.js'];
jsHintOptions['es3'] = true;
// Replacing `var` with `let` is sort of a hack that stops jsHint from
// complaining that I'm using `var` like `let` should be used, but
@ -63,6 +64,7 @@ gulp.task('lint', function () {
gulp.task('fastlint', function () {
var directories = ['./*.js', './tournaments/*.js', './chat-plugins/*.js', './config/*.js'];
delete jsHintOptions['es3'];
return gulp.src(directories)
.pipe(replace(/\bvar\b/g, 'let'))
@ -71,4 +73,5 @@ gulp.task('fastlint', function () {
.pipe(jshint.reporter('fail'));
});
gulp.task('default', ['lint']);
gulp.task('default', ['fastlint', 'data']);
gulp.task('lint', ['fastlint', 'data']);

View File

@ -335,6 +335,6 @@ exports.BattleStatuses = {
this.effectData.counter *= 2;
}
this.effectData.duration = 2;
},
}
}
};

View File

@ -591,7 +591,7 @@ exports.BattleMovedex = {
return;
}
return false;
},
}
},
stockpile: {
inherit: true,

View File

@ -369,7 +369,7 @@ exports.BattleMovedex = {
},
explosion: {
inherit: true,
basePower: 500,
basePower: 500
//desc: ""
},
extremespeed: {
@ -809,7 +809,7 @@ exports.BattleMovedex = {
},
selfdestruct: {
inherit: true,
basePower: 400,
basePower: 400
//desc: ""
},
sketch: {

View File

@ -3258,7 +3258,7 @@ exports.BattleFormatsData = {
},
arceusunknown: {
eventPokemon: [
{"generation":4,"level":100,"moves":["judgment","roaroftime","spacialrend","shadowforce"],"pokeball":"cherishball"},
{"generation":4,"level":100,"moves":["judgment","roaroftime","spacialrend","shadowforce"],"pokeball":"cherishball"}
],
tier: "Uber"
},

View File

@ -32,7 +32,7 @@ exports.BattleItems = {
naturalGift: {
basePower: 60,
type: "Ice"
},
}
},
blukberry: {
inherit: true,
@ -249,7 +249,7 @@ exports.BattleItems = {
naturalGift: {
basePower: 80,
type: "Flying"
},
}
},
leppaberry: {
inherit: true,
@ -334,7 +334,7 @@ exports.BattleItems = {
naturalGift: {
basePower: 70,
type: "Steel"
},
}
},
passhoberry: {
inherit: true,
@ -447,7 +447,7 @@ exports.BattleItems = {
naturalGift: {
basePower: 60,
type: "Ground"
},
}
},
sitrusberry: {
inherit: true,

View File

@ -125,7 +125,7 @@ exports.BattleMovedex = {
return false;
}
this.useMove(this.lastMove, pokemon);
},
}
},
cottonspore: {
inherit: true,
@ -554,7 +554,7 @@ exports.BattleMovedex = {
secondary: {
chance: 30,
status: 'tox'
},
}
},
poisongas: {
inherit: true,
@ -608,7 +608,7 @@ exports.BattleMovedex = {
}
return null;
}
},
}
},
ragepowder: {
num: 476,
@ -851,7 +851,7 @@ exports.BattleMovedex = {
},
onHitSide: function (side, source) {
source.addVolatile('stall');
},
}
},
whirlpool: {
inherit: true,

View File

@ -348,7 +348,7 @@ exports.BattlePokedex = {
},
krookodile: {
inherit: true,
baseStats: {hp:95,atk:117,def:70,spa:65,spd:70,spe:92},
baseStats: {hp:95,atk:117,def:70,spa:65,spd:70,spe:92}
},
gothita: {
inherit: true,

View File

@ -213,5 +213,5 @@ exports.BattleItems = {
// }
// },
desc: "Raises Farfetch'd's critical hit rate two stages."
},
}
};

View File

@ -1785,7 +1785,7 @@ exports.BattleMovedex = {
secondary: {
chance: 50,
volatileStatus: 'confusion'
},
}
},
nightdaze: {
inherit: true,