mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Merge pull request #1192 from Slayer95/lint
Gulpfile: check for ES3 issues in data files
This commit is contained in:
commit
b8f734edc6
|
|
@ -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>✓ 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");
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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']);
|
||||
|
|
|
|||
|
|
@ -335,6 +335,6 @@ exports.BattleStatuses = {
|
|||
this.effectData.counter *= 2;
|
||||
}
|
||||
this.effectData.duration = 2;
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ exports.BattleMovedex = {
|
|||
return;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
}
|
||||
},
|
||||
stockpile: {
|
||||
inherit: true,
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -213,5 +213,5 @@ exports.BattleItems = {
|
|||
// }
|
||||
// },
|
||||
desc: "Raises Farfetch'd's critical hit rate two stages."
|
||||
},
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1785,7 +1785,7 @@ exports.BattleMovedex = {
|
|||
secondary: {
|
||||
chance: 50,
|
||||
volatileStatus: 'confusion'
|
||||
},
|
||||
}
|
||||
},
|
||||
nightdaze: {
|
||||
inherit: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user