I'm reasonably confident that the tslint settings are where I want
them to be, at this point. Going over the line length limit is a
warning, not an error, so I don't have to worry about that being
too harsh.
Probably the most controversial change here is that I have a max line
length limit, currently set to 140 columns. Lines that set up a
string buffer, lines involving regexes, and the text parser's replace
chains are excluded from the limit.
PS has otherwise been moving towards a line length limit, it just
hasn't been linter-enforced yet. I worry about contributors being
annoyed by it, especially since it's not like it's handled
automatically by Prettier or something.
Oh well, it's set to "warning" so Travis won't yell about it.
This is the first step of moving the entire client over to
TypeScript + Preact!!!!
The main change here is that battledata.js has been split into three
files:
- `src/battle-dex.ts`
- `src/battle-dex-data.ts`
- `src/battle-dex-misc.js`
These are concatenated back into `battledata.js` in the client, so
third parties (and specifically, old replay files) should be
unaffected. Also, this makes sure that we don't have more than two
dependencies right now.
The compilation is done with Babel 7 beta, because no stable version
of Babel supports TypeScript. We're not using `tsc` because it can't
compile to ES3 and it doesn't support preserving line numbers.
`toRoomid` has been moved from client.js to battle-dex.ts.
We no longer have the relevant Githook for automatic building, so
putting it in `githooks/` no longer makes much sense. It's now manually
called with a build script `./build`, like other PS websites (most
notably PSDex and the damagecalc).
Chrome peer-pressuring us by locking Notification behind HTTPS... they
also lock plenty of other things behind HTTPS and the trade-off seems
worth-it now.
BW animated sprites are now also automatically generated. In addition,
the generation script can now handle female sprites and cosmetic forms.
The storage format has also changed to be more concise.
This is the search index build script from the Gen 6 Learnsets
repository, slightly rewritten for the PS client environment. It
expects a checkout of the server respository in
`data/Pokemon-Showdown`.