Commit Graph

10 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
e8c106ea1e Remove all mentions of "Nintendo" 2023-12-21 11:44:43 -07:00
André Bastos Dias
6f45298ef4
Gen 1 and Gen 2: Nickname Clause (#9505) 2023-04-13 03:21:48 -07:00
Annika
0bc78dddf5 TypeScript 5! 2023-04-09 13:02:19 -07:00
May Evans
78a4b5ca7f
Gen 1: Add incompatibilities to NC97 Move Legality (#8814) 2022-06-20 12:49:36 -04:00
Kris Johnson
5b8dfc7d8e [Gen 1] Japanese OU: Allow Japanese event moves 2021-04-30 01:55:06 -06:00
May Evans
d2f9d52403
Gen 1: Fix Japanese OU and Tradebacks OU legality (#8242)
* [Gen 1] OU Standard rules, fix validator rule name

erm...

* Fix [Gen 1] Japanese OU & Tradebacks OU

- [Gen 1] Japanese OU shouldn't use the Nintendo Cup 1997 Legality unless you want it to be "RG OU" or something. If so, the name should be changed for accuracy.
- [Gen 1] Tradebacks OU shouldn't complex ban those combinations, the Stadium 2 relearner fixes them all.

* I really did do that huh
2021-04-30 01:44:56 -06:00
Kris Johnson
246b667c03 Add [Gen 1] Japanese OU 2021-04-27 20:48:48 -06:00
InAShellnut
9ab4c86fe3
Add Stadium 2, Nintendo Cup 1997, and Nintendo Cup 2000 (#8195)
An implementation of Nintendo Cup 1997, Nintendo Cup 2000, and Pokemon Stadium 2, for Pokemon Showdown. The only thing which has not been implemented was showing the exact health of both Pokemon in Pokemon Stadium 2, however implementing that requires changes to the showdown client. The Nintendo Cup 1997 code was done by Enigami, and the rest was by myself (Shellnuts).

This should fulfill the requirements asked by the following accepted suggestions:
https://www.smogon.com/forums/threads/please-add-a-pok%C3%A9mon-stadium-2-simulator-in-showdown.3679486/
https://www.smogon.com/forums/threads/add-nintendo-cup-1997-and-2000-as-challenge-only-formats.3653454/
2021-04-22 00:54:14 -07:00