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

# large-class

> A class has more than 30 methods, accessors, constructors or function-valued fields.

## What it flags

A class has more than 30 methods, accessors, constructors or function-valued fields. Plain data properties (entities, DTOs) are not counted.

## How to review or fix

Override with `limits.largeClassMembers`.

## Configuration

Set the rule to `"off"` in `loadwise.config.json` to drop its findings:

```json theme={null}
{
  "rules": { "large-class": "off" }
}
```

This rule checks JavaScript and TypeScript classes only; other languages are not checked. An object with a `level` and `options` sets the rule's thresholds. It takes two options, both positive integers:

* `maxMethods`: the most methods, accessors, constructors and function-valued fields a class can have. Without it, the limit comes from the maintainability policy's `limits.largeClassMembers`, or 30 when the policy does not set it.
* `maxLines`: the most lines of code a class can have, not counting comments and blank lines. Without it, class length is not checked.

A class gets at most one finding. Its length is checked only when its member count is within `maxMethods`.

```json theme={null}
{
  "rules": {
    "large-class": { "level": "warn", "options": { "maxMethods": 40, "maxLines": 500 } }
  }
}
```

`level` is required: `"warn"` reports findings without changing the exit code. An `overrides` entry can set different options for the files it matches, and its options win over the top-level ones.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.