Commit Graph

10 Commits

Author SHA1 Message Date
urkerab
80d652d59b Sturdy should trigger before Focus Sash but after False Swipe 2021-01-05 16:58:03 +00:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Guangcong Luo
3d68248efa Update to latest eslint
We're skipping two major typescript-eslint versions, so there are a
bunch of changes here, including:

- it's catching a lot of things it didn't catch in the past, for
  reasons unclear to me

- no-unused-vars has to be explicitly disabled in global-types now

- a lot of `ts-ignore`s were never necessary and have been fixed

- Crashlogger can now handle being thrown things that aren't errors.
  This has never been a problem in the past, but to satisfy TypeScript
	we might as well not die in a fire on the off chance someone tries to
	`throw null` or something.
2020-09-29 15:28:08 -07:00
urkerab
5d714fbb56
Replace @ts-ignore with type assertions or other less unsafe constructs (#7390) 2020-09-19 02:07:48 -07:00
Guangcong Luo
2f805c93a2
Remove "Battle" prefix from data exports (#7039)
`BattlePokedex` is now `Pokedex`, `BattleItems` is now `Items`, etc.

I also renamed `Movedex` to `Moves` and `Statuses` to `Conditions`.

`TypeChart` isn't `Types` yet, because unlike the others, it's not
indexed by ID. That should probably be fixed one day.
2020-07-24 12:42:26 -07:00
Mia
6839a1f4db
Add a library for utility functions (#6817) 2020-06-09 22:06:43 -07:00
Guangcong Luo
42f949a0ed Remove egg group info from Gen 1 Pokédex 2020-04-28 16:25:35 -07:00
Guangcong Luo
bfe651bd12 Fix Gen 1 gender
It was apparently broken by the TypeScript refactor.
2020-04-26 17:52:06 -07:00
Guangcong Luo
31a81a91a2 Fix @type in .ts files
Some JSDoc type assertions failed to get converted during various .ts
refactors. This commit takes care of them.
2020-04-24 14:19:08 -07:00
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00