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
deda1db857
Snowscape was incorrectly named Snow (#10920)
Some checks are pending
Node.js CI / build (16.x) (push) Waiting to run
2025-02-19 21:34:55 -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
Leonard Craft III
28aed0975a Remove some TODOs that are done 2023-01-16 00:12:55 -06:00
Kris Johnson
1feb9ddafb Add Snow messages 2022-11-20 13:18:02 -07:00
Kris Johnson
d50c8c249b
Add Gen 9 (#8997) 2022-11-17 20:46:29 -05:00
Guangcong Luo
d4ad847e87 Make "Dynamax Energy" message smaller 2021-04-02 23:00:30 -07:00
Spandan Punwatkar
b77d6cb20f
Add simulator support for multi battle (#7929)
This doesn't include matchmaking support (which had to be removed
for reworking), but it includes everything else.

Co-authored-by: Spandamn <spandan.punwatkar@gmail.com>
Co-authored-by: MacChaeger <msaimrkon@gmail.com>
Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2021-03-31 22:22:25 -07:00
Kris Johnson
890b4d9f59
Refactor text files (#7680) 2020-11-11 14:40:55 -08:00
Guangcong Luo
7eafea8ee1 Add client text data
This syncs data/text to exactly match the client's data/text, in
preparation for them to be merged. The server's data/text will be
canonical, moving forward:

Relevant changes:

- A new file `data/text/default` has been added, for battle messages
  not associated with a move/item/ability.

- As One (Glastrier) and As One (Spectrier) should not have a start
  message; only As One itself.

- Hidden Power's `realMove` property does not belong in data/text
  and has been removed (it's still in data/moves where it belongs).
2020-10-27 16:56:08 +00:00