Commit Graph

6 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
Mia
d3e60b31f7
Sim: Use a CSPRNG (#10806)
* Sim: Use a CSPRNG

* Add test

* fix test prng

* move prng test to others

* fix slight hack

* tf?

* Fuck this

* fucking lol

* fix crap

* i'm going to kill someone

* i hate state

* fix test

* Good work genius

* typo

* Fix exportinputlog

* Refactor for inputlog backwards compatibility

This is a pretty major refactor which is mostly unrelated to the
feature, but it does make the code a lot simpler.

* Readability pass

* Readability (again)

* Remove sodium-native dependency

* Refactor to serialize seeds in hex strings

(Also removes the Buffer dependency from PRNG, and slightly improves
comments.)

* Apparently << is 32-bit signed

* Readability

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-01-11 13:56:34 -06:00
livid washed
3fe8e468c9
Fix Random Battles crash (#10424) 2024-07-15 20:27:27 -05:00
ACakeWearingAHat
3049d4cf7a
Randomized format set updates (#10421) 2024-07-15 20:19:47 -04:00
livid washed
085839ca39
Revamp ability generation in Random Battles (#10392) 2024-07-12 00:06:30 -06:00
livid washed
b2f346344c
Add July 2024 Randomized Format Spotlight (#10379)
* Add July 2024 Randomized Format Spotlight

* description

* clear out spotlight section, move to normal

* lint

* Update config/formats.ts

* Update data/random-battles/gen9/teams.ts

* Update data/random-battles/gen9/teams.ts

* last minute set changes thanks quziel

---------

Co-authored-by: ACakeWearingAHat <45981036+ACakeWearingAHat@users.noreply.github.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-07-01 10:50:34 -06:00