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. |
||
|---|---|---|
| .. | ||
| examples | ||
| tools | ||
| battle-actions.ts | ||
| battle-queue.ts | ||
| battle-stream.ts | ||
| battle.ts | ||
| dex-abilities.ts | ||
| dex-conditions.ts | ||
| dex-data.ts | ||
| dex-formats.ts | ||
| dex-items.ts | ||
| dex-moves.ts | ||
| dex-species.ts | ||
| DEX.md | ||
| dex.ts | ||
| field.ts | ||
| global-types.ts | ||
| index.ts | ||
| NONSTANDARD.md | ||
| pokemon.ts | ||
| prng.ts | ||
| README.md | ||
| side.ts | ||
| SIM-PROTOCOL.md | ||
| SIMULATOR.md | ||
| state.ts | ||
| team-validator.ts | ||
| TEAMS.md | ||
| teams.ts | ||
| tsconfig.json | ||
Node.js package
Pokémon Showdown has a Node.js API. It currently only works in Node, not browsers, although we're working on unifying it to work in browsers.
You can install it with the usual:
npm install pokemon-showdown
And you can use it to do the following things:
Simulating battles
See: sim/SIMULATOR.md
Also available as a command-line API!
Validating, generating, and converting teams
See: sim/TEAMS.md
Also available as a command-line API!
Getting Pokédex information
See: sim/DEX.md
Undocumented APIs
Pokémon Showdown's Node.js package has TypeScript definitions for everything it exports, including a lot of undocumented APIs.
Please be aware that any undocumented API is unstable and should not be relied upon not to change. We do not follow semver for undocumented APIs. If you really want to use an undocumented API, remember to pin the exact PS version in your dependencies. You probably also want to follow the API update channel in the Discord server: https://psim.us/devdiscord