> ## Documentation Index
> Fetch the complete documentation index at: https://illegalcord.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Plugin Changes

> Prepare a plugin change for this Illegalcord source tree.

This repository builds plugins from source folders. Publishing means preparing a clean branch or pull request against the repository that should include the plugin.

## Before opening a PR

Run:

```bash theme={null}
pnpm testTsc
pnpm lint
pnpm lint:patches
pnpm generatePluginJson
```

If you added CSS:

```bash theme={null}
pnpm lint-styles
```

## Required plugin shape

| Requirement     | Notes                                                                            |
| --------------- | -------------------------------------------------------------------------------- |
| Folder          | `src/plugins/<name>`, `src/equicordplugins/<name>`, or `src/userplugins/<name>`. |
| Entry file      | `index.ts` or `index.tsx`.                                                       |
| Export          | `export default definePlugin({ ... })`.                                          |
| Required fields | `name`, `description`, `authors`.                                                |
| Authors         | Use `Devs` or `EquicordDevs`, not inline authors.                                |
| SPDX header     | Required on every new source file.                                               |
| Dependencies    | Required for imperative API usage.                                               |

## Source review checklist

* The plugin solves a real problem and is not just CSS hiding or restyling UI.
* The diff is small and scoped.
* Settings have defaults.
* Descriptions are human and end with a period.
* No `any`, `as unknown as`, `@ts-ignore`, or non-null assertions.
* No raw DOM, unpaired listeners, unpaired timers, or leaked Flux subscriptions.
* No Discord API `fetch`; use `RestAPI` and `Constants.Endpoints` when needed.
* No hardcoded mangled classes or CDN URLs.
* Patches use stable `find` strings and bounded regex gaps.

## Metadata

Regenerate plugin metadata after plugin changes:

```bash theme={null}
pnpm generatePluginJson
```

The Plugins tab depends on generated metadata to show plugin source type, user plugin status, and filtering data correctly.

## Documentation

Add a short `README.md` only when the plugin needs usage detail that does not fit in the plugin description or settings text. Keep it focused on behavior, settings, and caveats.

<Info>
  External raw-plugin installation is not the documented path for this repository. Keep plugin docs aligned with the source build.
</Info>
