Commit Graph

23714 Commits

Author SHA1 Message Date
Guangcong Luo
c57fcf25c6
Default to type-aware linting (#7538)
In the past, we used non-type-aware linting in our pre-push hook, as
well as in `npm test`. This was for performance reasons.

In practice, though, we use an eslint cache, which makes even
type-aware incremental linting instantaneous. My rule is that you
should be able to make a small change and lint in under 10 seconds, and
`npm test` should take under 30 seconds, and linting with no changes
(for the pre-push hook) should be under 2 seconds. This is still true
for type-aware linting, so there's no actual need for fast linting.

We've also switched to using `--max-warnings 0` to convert warnings to
errors. This seems to allow them to use the same cache file.

A big improvement here is that `npm test` should now be enough for
testing. I think everyone ran `npm run full-test` for a while because
`npm test` didn't have type-aware lint errors, but now that it does,
you'll be able to use it again and have your tests run a lot faster.
2020-10-19 02:52:33 -07:00
Guangcong Luo
9d87616176
Add more style linting rules (#7537)
* Lint arrow-body-style

* Lint prefer-object-spread

Object spread is faster _and_ more readable.

This also fixes a few unnecessary object clones.

* Enable no-parameter-properties

This isn't currently used, but this makes clear that it shouldn't be.

* Refactor more Promises to async/await

* Remove unnecessary code from getDataMoveHTML etc

* Lint prefer-string-starts-ends-with

* Stop using no-undef

According to the typescript-eslint FAQ, this is redundant with
TypeScript, and they're not wrong. This will save us from needing to
specify globals in two different places which will be nice.
2020-10-19 02:42:28 -07:00
Mia
918d436ac0
Youtube: Move video data fetching to a different function (#7536) 2020-10-19 02:18:44 -07:00
Ben Davies
6f26265ff9 Tests: simplify Dashycode transcodeWithSets helper 2020-10-19 05:15:02 -03:00
Annika
5118c9edfa
Moderation: Make weekbans override 2-day roombans (#7534)
For consistency with /weeklock
2020-10-19 01:07:40 -07:00
Annika
bca73b19cc
Room events: Add a command to view categories (#7525) 2020-10-19 01:07:05 -07:00
Distrib
36ce1dc872
Add alias for /makegroupchat and /deletegroupchat (#7532)
For https://www.smogon.com/forums/threads/make-mgc-shorthand-for-makegroupchat.3671952/
2020-10-19 01:06:20 -07:00
May Evans
0ee6e5f3ce
Fix Stadium Struggle vs Ghost-types (#7527)
Struggle should deal neutral damage to Ghost-types in Stad1 exclusively. I'm not exactly a "programmer", but if I can help fix this sim improve then that's good enough for me.

Source: https://www.smogon.com/forums/threads/stadium-format-is-now-available-on-ps.3526616/post-8517229

Thanks to Kris for helping me figure out what to do, it means a lot.
2020-10-19 00:59:34 -07:00
Annika
fe034ac087
Helptickets: Don't show battles for self-reports (#7520) 2020-10-19 00:57:38 -07:00
Kris Johnson
7ebc4411e9
Fix Allowing Hidden Power with an undefined hpType (#7541) 2020-10-18 22:52:25 -04:00
Marty-D
900a375c79 Add CAP 28 2020-10-18 19:26:33 -04:00
The Immortal
618e385126 Add Pikachu-Kalos event 2020-10-19 00:47:59 +04:00
Annika
111f1383a9
Modlog: Add weekroomban as a punishment 2020-10-18 12:04:11 -07:00
Instruct
8007f54990
PU: Ban Exeggcutor (#7539)
https://www.smogon.com/forums/threads/pu-general-rules-tiering-and-announcements-thread.3660650/page-2#post-8629532
2020-10-18 21:44:38 +04:00
Guangcong Luo
264bf83152 Update devDependencies
For some reason, the previous set of devDependencies fail tests for me
in macOS. I'm updating them just to be safe.
2020-10-18 07:48:17 +01:00
Annika
c9d62d944e
Chatfilters: Fix wordfilter storage (#7530) 2020-10-17 23:13:28 -07:00
The Immortal
5c39dcc9ce Random Battle updates 2020-10-17 14:37:13 +04:00
Mia
d020a2f921
Youtube: Support searching for videos (#7529) 2020-10-17 02:52:04 -07:00
Leonard Craft III
1081a4423f
Add various mechanics tests (#7506) 2020-10-16 21:07:05 -07:00
Annika
7e188dee1c
Battlesearch: Fix typo 2020-10-16 14:29:53 -07:00
Kris Johnson
6699a57f4d
Fix spread move mechanics in ADV Doubles (#7523) 2020-10-16 11:22:48 -04:00
Annika
9aa837b9df
ProcessManager: Support timing out queries (#7502) 2020-10-16 02:56:02 -07:00
The Immortal
ef217ccd18 Update National Dex Monotype 2020-10-16 11:14:45 +04:00
The Immortal
845b8f1458
Gen 1 Random: Give Magikarp Splash 2020-10-16 10:27:30 +04:00
May Evans
049ccaf368
Remove illegal moves from RBY Random Battles (#7528)
This removes Harden from Kakuna and Dragon Rage from Magikarp.

Harden is incompatible with Poison Sting and String Shot, as Kakuna doesn't learn it upon evolving like Metapod. 
https://www.smogon.com/forums/threads/random-battles.3526564/post-8577809

Magikarp only gets Dragon Rage via a Japanese event, and since international RBY mechanics are used, it's impossible for this to be used. 

As far as I know, these are the only incompatibilities.
2020-10-16 04:53:36 +04:00
Annika
ab93c7a550 Punishments: Fix bug in getRoomPunishments
This fixes the issue with users who got roombanned on multiple IP addresses being autolocked erroneously.
2020-10-15 15:22:50 -07:00
The Immortal
61ec675bf8 Add Pikachu-Unova event 2020-10-15 21:38:56 +04:00
Nol
cabc990cd0
Add alias for Shell Side Arm (#7524)
* Add alias for Shell Side Arm

* Also add ssa as an alias
2020-10-15 19:28:46 +04:00
The Immortal
7638f8238a Fix Present healing vs Substitute 2020-10-15 18:46:58 +04:00
Kris Johnson
21663f95e4 Fix formatting for G-Max moves 2020-10-15 02:44:17 -06:00
Annika
018105bd10 Helptickets: Escape HTML in common battles 2020-10-14 08:52:52 -07:00
Marty-D
131aa64a5e
Fix Gulp Missile's interaction with Disguise 2020-10-14 11:43:10 -04:00
Guangcong Luo
a65faf263f
Stop using assert.strict.strictEqual (#7515)
It turns out that when I switched us from `assert` to `assert.strict`,
I didn't actually update any existing tests or tell anyone:

0df0d234f2

So apparently everyone else just kept on using `strictEqual`.

This will be a PR and also throw an error if people continue trying to
use it, which should make it much clearer what PS policy is on this.

A lot of the problem may be that TypeScript marks assert.strict.equal
as deprecated when it's not. This was fixed 4 days ago:

https://github.com/DefinitelyTyped/DefinitelyTyped/pull/48452

But this probably hasn't made it to a thing yet. Until then, you'll
have to deal with TS marking your tests as deprecated, but it shouldn't
be too long.

Accidentally using `assert` instead of `assert.strict` should now show
an error. This protects against the probably much worse mistake of
accidentally using `assert.equal` rather than `assert.strict.equal`.

`assert.ok` is also deprecated now.
2020-10-14 01:19:03 -07:00
Guangcong Luo
67a4e9f185 Add validator for Pokestar event moves
See #7412
2020-10-13 18:01:32 -07:00
The Immortal
84e0aeb8d1 Gen 7: Random Battle updates 2020-10-14 04:21:44 +04:00
Kris Johnson
510ab4ecb3
Fix typo 2020-10-13 16:55:31 -06:00
The Immortal
cfa56f66e6 Add Arceus EV Limit to DPP AG 2020-10-13 21:10:45 +04:00
Guangcong Luo
7fc498ff88 Add validator for evoItem
See also #7412
2020-10-13 04:40:38 -07:00
Guangcong Luo
0b0cf3733d Fix toTimestamp type signature 2020-10-13 04:40:38 -07:00
Kris Johnson
52fb644d9e
Update various datasearch commands (#7512) 2020-10-12 15:46:19 +04:00
Annika
2f816d68fb Fix permission checking for room deletion 2020-10-11 17:33:31 -07:00
Kris Johnson
4ea47cb308
Gen 4: Move Arceus to AG (#7511) 2020-10-12 03:01:50 +04:00
Kris Johnson
31e2e492a1
Repeats: Don't format until repeating and give raw text in the page (#7505) 2020-10-11 14:35:52 -07:00
Mia
ca3e7237d7
Youtube: Support channel categories (#7509) 2020-10-11 13:44:42 -07:00
Kris Johnson
d9b3a510ad
TextFormatter: Support replacing \n without trusted (#7507) 2020-10-11 13:38:34 -07:00
Annika
ea9170b062
Helptickets: Display common battles in more ticket types (#7510) 2020-10-11 13:27:23 -07:00
PartMan
3c7129cb04
Remove background from /scav queue (#7508) 2020-10-11 17:44:05 +04:00
Kris Johnson
9b1668c4b7
National Dex: Split UU and non-UU Pokemon (#7503) 2020-10-11 17:23:11 +04:00
Guangcong Luo
1c0c77ff6b
Update to TypeScript 4.0 (#7504) 2020-10-10 14:43:32 -07:00
Guangcong Luo
e40ab96db7 Update Mocha dependency version 2020-10-09 22:33:17 -07:00