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.
* Fix move validation involving prevo-only moves
https://www.smogon.com/forums/threads/bug-report-validator.3759104/
This is something that should've always been in #10574. Setting setSources.babyOnly becomes useless here because it eventually gets set after validating a move is complete.
* Actually fix DW
This makes it so we no longer need to ad-hoc convert seeds from strings
to arrays when we get them from text protocols like the command line or
BattleStream's `reseed` command.
It also has the side benefit of making inputlogs very slightly smaller.
* 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>
* Properly validate HP type for events
https://www.smogon.com/forums/threads/bug-report-validator.3754044/
* Update team-validator.ts
* Update team-validator.ts
* Update sim/team-validator.ts
Co-authored-by: urkerab <urkerab@users.noreply.github.com>
* Update team-validator.ts
Just some CamelCase...
* Prevent HP Stellar from being usable
https://www.smogon.com/forums/threads/bug-report-validator.3755718/
* Apply suggestions from code review
---------
Co-authored-by: urkerab <urkerab@users.noreply.github.com>
Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
* PoC deduplicate `Species` against parent mod
Have to punt on the deep equals for now.
* `DexSpecies`: Tweak dedup logic to be faster
* `DexSpecies`: Improve comments around dedup logic
* `DexSpecies`: Use utils deepEquals function for dedup
Significantly faster than the `assert` equivalent