Commit Graph

10 Commits

Author SHA1 Message Date
Guangcong Luo
e25bec3620 Remove some implicit conversions
boolean -> number and number -> string should be explicit. Probably
string -> number should be, too, but I'm not ready to turn on the lint
option yet.

This was supposed to be part of the big ESLint refactor but I forgot
to push it. <_<
2025-02-25 22:55:01 -08:00
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
pyuk-bot
7bb2fd1869
Overhaul 'SwitchIn' event for more accurate effect resolution order (#10766) 2025-01-28 16:51:17 -06:00
Kris Johnson
63ca4e2c81 Use DexTypes#names() where applicable 2024-11-10 20:32:24 -07:00
larry-the-table-guy
cb699bed4c
Data: Use dex.types.all() for Conversion 2 (#10612)
Bugfix for gen8linked, optimization for base and gen8linked
2024-10-12 22:35:56 -06:00
Kris Johnson
44b0f7d8c1
Battle Actions: Clean up runMove and useMove function args (#10492)
* Battle Actions: Clean up `runMove` and `useMove` function args

* sdfsdf
2024-08-18 09:00:13 -06:00
Karthik Bandagonda
16d9ffe07e
Fix interaction between Encore and priority-blocking effects (#10434) 2024-07-22 20:54:06 -05: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
156a39405f
Refactor some move lists to move flags (#9396) 2023-03-18 22:21:00 -05:00
WeWuzNidokangz
580ed48329
OMs: Fix generation consistency (#9088)
* Linked: Fix generation consistency

* Fix same issue with Pokebilities

* Clean up
2022-12-05 16:05:08 -07:00