Commit Graph

11 Commits

Author SHA1 Message Date
Guangcong Luo
fc6d963912 Strongly type Config
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
(Also remove a bunch of global types)
2025-05-19 13:40:12 -07:00
Mia
8e378c6129 Add static website for viewing server-side teams 2025-04-09 19:36:58 -05:00
Guangcong Luo
a10821ab8b
Update to ESLint 9 (#2326)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
This finally removes the tslint dependency and switches to eslint.

There are a lot of other changes here, too, to bring the codebase up to
server standards. TSLint never had much in the way of indentation
enforcement.

Not very happy about eslint splitting itself up over 6 dependencies,
or its documentation over three websites, nor how poorly documented the
new flat config is, but I mean, eslint's gonna eslint. Customizing
would be even harder if we tried to use Biome or something. They mostly
seem to go full Prettier.

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 (except in ES3
  code). We otherwise now consistently use template strings for this.
2025-02-25 20:05:32 -08:00
Guangcong Luo
d66b080873 Move replay-config to config/
I'm trying to centralize config.
2023-11-16 23:49:33 +00:00
Guangcong Luo
efa553d96b Build: Move ads/analytics into config
This keeps ads/analytics out of the repository, since they
shouldn't be used in forks and dev machines anyway.

Hiding ads in `website/news/include.php` was a thing I did in
the early days because one of the devs was ashamed of ads, and
`website/` wasn't in a public repository at the time. At this
point, though, I'm done being ashamed of it. You can obviously
see ads on the website and everyone knows they fund the server.
2021-11-25 20:52:51 -05:00
Leonard Craft III
b55b85204d
Remove whitelist from config-example (#1601) 2020-09-06 17:48:04 -07:00
Guangcong Luo
54343a9aa0 Stop requiring \\. for Config.whitelist
PS already does other post-processing for the Config whitelist to
make sure it's matching a domain name, so also making it no longer
require escaping is useful.
2020-08-15 15:40:00 -04:00
Annika
367ed82e56
Support configurable URLs (#1543) 2020-07-21 15:27:21 -07:00
Annika
5bbd8e5827
Add autolock_ip to the example configuration (#1556)
PHP crashes otherwise.
2020-07-13 21:08:13 -07:00
Guangcong Luo
399f1735b6 Fix build tools
It should now be possible to build from a fresh checkout with
`node build`.
2018-05-17 11:52:32 -05:00
Guangcong Luo
82e7a917ab Move session library inside repository
For too long, ntbb-session and ntbb-database have been maintained
outside of this repo, but no longer! All these files are now part of the
repository, making it significantly more self-contained.

If I had to say why it took this long, I think it was mostly inertia. It
was easier leaving them where they were than having to audit them for
private keys in the wrong places, etc.

I'm starting to think of PS more as sim first, website secondary than
the other way around, now. Especially now that we don't have a forum,
the website itself isn't really important... Maybe one day I'll get rid
of the landing page and make the sim itself the first thing you see when
you hit pokemonshowdown.com... but today is not that day!

The repo is still not "batteries-included" since I am not going to teach
anyone how to set up PHP and MySQL or even get the config files working.
But for anyone who wanted their own client, well, it gets a lot easier
to do now.
2016-10-20 13:16:06 -04:00