Commit Graph

15 Commits

Author SHA1 Message Date
Guangcong Luo
78439b4a02
Update to ESLint 9 (#10926)
ESLint has a whole new config format, so I figure it's a good time to
make the config system saner.

- First, we no longer have separate eslint-no-types configs. Lint
  performance shouldn't be enough of a problem to justify the
  relevant maintenance complexity.

- Second, our base config should work out-of-the-box now. `npx eslint`
  will work as expected, without any CLI flags. You should still use
  `npm run lint` which adds the `--cached` flag for performance.

- Third, whatever updates I did fixed style linting, which apparently
  has been bugged for quite some time, considering all the obvious
  mixed-tabs-and-spaces issues I found in the upgrade.

Also here are some changes to our style rules. In particular:

- Curly brackets (for objects etc) now have spaces inside them. Sorry
  for the huge change. ESLint doesn't support our old style, and most
  projects use Prettier style, so we might as well match them in this way.
  See https://github.com/eslint-stylistic/eslint-stylistic/issues/415

- String + number concatenation is no longer allowed. We now
  consistently use template strings for this.
2025-02-25 20:03:46 -08:00
Guangcong Luo
88be8d7b3c
Refactor types for Lowercase<string> (#10377)
TypeScript 4.8+ supports Lowercase for lowercase strings, which isn't
exactly what ID is, but can be used to type IDs in object keys and data
entries that previously required string. I'm calling it IDEntry in places
where it should be an ID but TypeScript doesn't support that.

Very conveniently, no additional casts will be needed when using ID
where IDEntry is expected.

It's caught at least a few bugs, which is also why I'm PRing: I didn't
write the code for the bugs it found, and don't know if it's the right
way to fix them.

This ballooned into several other type refactors.
2024-07-01 15:57:14 -07:00
Kris Johnson
49bd6bc0f5 Update Crabominable, Scovillain, and Gholdengo evolution methods 2022-12-19 17:42:21 -07:00
Marty
5c6abb95de CAP: Unnerf Equilibra, nerf Jumbao
https://www.smogon.com/forums/posts/9326677/
https://www.smogon.com/forums/posts/9297149/
Thanks, Wulfanator!
2022-09-12 21:46:53 -04:00
Marty
dbb0416561 Gen 8 CAP: Actually, nerf Pyroak
https://www.smogon.com/forums/posts/9136596/show
2022-02-27 19:39:59 -05:00
Marty
1ebaf62c06 Gen 8 CAP: Buff Pyroak
https://www.smogon.com/forums/posts/9106281/show
2022-02-11 15:12:58 -05:00
Kris Johnson
a1ec8acea4 CAP: Nerf Chromera and Buff Voodoom 2021-06-12 22:52:49 -06:00
Instruct
da8c1580ea
Gen 5: Refactor to use unreleasedHidden (#8349) 2021-06-05 09:00:15 -07:00
Marty-D
35033203e8 CAP: Update Equilibra line's Abilities 2020-09-13 12:56:47 -04:00
Kris Johnson
43ec001996
CAP: Nerf Equilibra (#7328) 2020-09-06 22:15:05 -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
Kris Johnson
4a80a56193
Update evolution methods (#6851) 2020-06-17 15:53:47 -07:00
Guangcong Luo
826e544b65 Refactor random set generation
The whole `checkBattleForme` system, introduced in 4410843e5a
and currently used in Gen 6 and 7, seems to have always been bugged.

As TI mentions in #5970, we already use `getPokemonPool` for alternate
forme handling.

I've replaced it with a roll for cosmetic formes.
2020-04-30 17:52:04 -07:00
Kirk Scheibelhut
4afdd7b947 Fix otherFormes capitalization in gen7/pokedex.ts 2020-04-29 23:31:45 -07:00
Kris Johnson
28bf388b98
Typescript data (#6553) 2020-04-23 09:16:09 -07:00