---
title: "Linter usage"
---

## Usage

Add the following in `tspconfig.yaml`:

```yaml
linter:
  extends:
    - "@azure-tools/typespec-azure-resource-manager/all"
```

## RuleSets

Available ruleSets:

- `@azure-tools/typespec-azure-resource-manager/all`

## Rules

| Name                                                                                                                                              | Description                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-child-resources`](../rules/arm-agent-base-type-child-resources.md)             | Resources decorated with @azureBaseType for the Agent base type must have both a Conversation and a Response child resource.                                                                                                                          |
| [`@azure-tools/typespec-azure-resource-manager/arm-agent-base-type-lifecycle-operations`](../rules/arm-agent-base-type-lifecycle-operations.md)   | Conversation and Response child resources of an Agent must define create, read, update, and delete lifecycle operations.                                                                                                                              |
| [`@azure-tools/typespec-azure-resource-manager/use-relationship-required-properties`](../rules/use-relationship-required-properties.md)           | Resources decorated with @azureBaseType for the Relationship base type must be extension resources with the required Relationship schema.                                                                                                             |
| [`@azure-tools/typespec-azure-resource-manager/arm-no-record`](../rules/arm-no-record.md)                                                         | Don't use Record types for ARM resources.                                                                                                                                                                                                             |
| [`@azure-tools/typespec-azure-resource-manager/arm-no-path-casing-conflicts`](../rules/arm-no-path-casing-conflicts.md)                           | Operation paths must be unique when compared case-insensitively.                                                                                                                                                                                      |
| [`@azure-tools/typespec-azure-resource-manager/no-override-props`](../rules/no-override-props.md)                                                 | Disallow redefining properties already defined in a base type.                                                                                                                                                                                        |
| [`@azure-tools/typespec-azure-resource-manager/arm-common-types-version`](../rules/arm-common-types-version.md)                                   | Specify the ARM common-types version using @armCommonTypesVersion.                                                                                                                                                                                    |
| [`@azure-tools/typespec-azure-resource-manager/arm-delete-operation-response-codes`](../rules/arm-delete-operation-response-codes.md)             | Ensure delete operations have the appropriate status codes.                                                                                                                                                                                           |
| [`@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes`](../rules/arm-put-operation-response-codes.md)                   | Ensure put operations have the appropriate status codes.                                                                                                                                                                                              |
| [`@azure-tools/typespec-azure-resource-manager/arm-post-operation-response-codes`](../rules/arm-post-operation-response-codes.md)                 | Ensure post operations have the appropriate status codes.                                                                                                                                                                                             |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-action-no-segment`](../rules/arm-resource-action-no-segment.md)                       | `@armResourceAction` should not be used with `@segment`.                                                                                                                                                                                              |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-duplicate-property`](../rules/arm-resource-duplicate-property.md)                     | Warn about duplicate properties in resources.                                                                                                                                                                                                         |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-envelope-property`](../rules/arm-resource-invalid-envelope-property.md)       | Check for invalid resource envelope properties.                                                                                                                                                                                                       |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-version-format`](../rules/arm-resource-invalid-version-format.md)             | Check for valid versions.                                                                                                                                                                                                                             |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-key-invalid-chars`](../rules/arm-resource-key-invalid-chars.md)                       | Arm resource key must contain only alphanumeric characters.                                                                                                                                                                                           |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-name-pattern`](../rules/arm-resource-name-pattern.md)                                 | The resource name parameter should be defined with a 'pattern' restriction.                                                                                                                                                                           |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-operation-response`](../rules/arm-resource-operation-response.md)                     | [RPC 008]: PUT, GET, PATCH & LIST must return the same resource schema.                                                                                                                                                                               |
| [`@azure-tools/typespec-azure-resource-manager/use-api-version`](../rules/use-api-version.md)                                                     | Validate ARM Resource operations include the api-version parameter referencing Azure.ResourceManager.CommonTypes.ApiVersionParameter.                                                                                                                 |
| [`@azure-tools/typespec-azure-resource-manager/use-operation-decorator`](../rules/use-operation-decorator.md)                                     | Validate ARM Resource operations use the correct decorator for the HTTP verb.                                                                                                                                                                         |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-path-segment-invalid-chars`](../rules/arm-resource-path-segment-invalid-chars.md)     | Arm resource name must contain only alphanumeric characters.                                                                                                                                                                                          |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-provisioning-state`](../rules/arm-resource-provisioning-state.md)                     | Check for properly configured provisioningState property.                                                                                                                                                                                             |
| [`@azure-tools/typespec-azure-resource-manager/version-progression`](../rules/version-progression.md)                                             | Validate that ARM service versions all use unique dates and are declared in strictly increasing chronological order.                                                                                                                                  |
| [`@azure-tools/typespec-azure-resource-manager/arm-custom-resource-no-key`](../rules/arm-custom-resource-no-key.md)                               | Validate that custom resource contains a key property.                                                                                                                                                                                                |
| [`@azure-tools/typespec-azure-resource-manager/arm-custom-resource-usage-discourage`](../rules/arm-custom-resource-usage-discourage.md)           | Verify the usage of @customAzureResource decorator.                                                                                                                                                                                                   |
| [`@azure-tools/typespec-azure-resource-manager/arm-feature-file-usage-discourage`](../rules/arm-feature-file-usage-discourage.md)                 | Verify the usage of @featureFiles decorator.                                                                                                                                                                                                          |
| [`@azure-tools/typespec-azure-resource-manager/beyond-nesting-levels`](../rules/beyond-nesting-levels.md)                                         | Tracked Resources must use 3 or fewer levels of nesting.                                                                                                                                                                                              |
| [`@azure-tools/typespec-azure-resource-manager/use-interface`](../rules/use-interface.md)                                                         | Validate ARM Resource operations are defined inside an interface declaration.                                                                                                                                                                         |
| [`@azure-tools/typespec-azure-resource-manager/no-resource-delete-operation`](../rules/no-resource-delete-operation.md)                           | Check for resources that must have a delete operation.                                                                                                                                                                                                |
| [`@azure-tools/typespec-azure-resource-manager/empty-updateable-properties`](../rules/empty-updateable-properties.md)                             | Should have updateable properties.                                                                                                                                                                                                                    |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-interface-requires-decorator`](../rules/arm-resource-interface-requires-decorator.md) | Each resource interface must have an @armResourceOperations decorator.                                                                                                                                                                                |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-invalid-action-verb`](../rules/arm-resource-invalid-action-verb.md)                   | Actions must be HTTP Post or Get operations.                                                                                                                                                                                                          |
| [`@azure-tools/typespec-azure-resource-manager/improper-subscription-list-operation`](../rules/improper-subscription-list-operation.md)           | Tenant and Extension resources should not define a list by subscription operation.                                                                                                                                                                    |
| [`@azure-tools/typespec-azure-resource-manager/lro-location-header`](../rules/lro-location-header.md)                                             | A 202 response should include a Location response header.                                                                                                                                                                                             |
| [`@azure-tools/typespec-azure-resource-manager/missing-x-ms-identifiers`](../rules/missing-x-ms-identifiers.md)                                   | Array properties should describe their identifying properties with x-ms-identifiers. Decorate the property with @OpenAPI.extension("x-ms-identifiers", #[id-prop]) where "id-prop" is a list of the names of identifying properties in the item type. |
| [`@azure-tools/typespec-azure-resource-manager/no-response-body`](../rules/no-response-body.md)                                                   | Check that the body is empty for 202 and 204 responses, and not empty for other success (2xx) responses.                                                                                                                                              |
| [`@azure-tools/typespec-azure-resource-manager/missing-operations-endpoint`](../rules/missing-operations-endpoint.md)                             | Check for missing Operations interface.                                                                                                                                                                                                               |
| [`@azure-tools/typespec-azure-resource-manager/patch-envelope`](../rules/patch-envelope.md)                                                       | Patch envelope properties should match the resource properties.                                                                                                                                                                                       |
| [`@azure-tools/typespec-azure-resource-manager/arm-resource-patch`](../rules/arm-resource-patch.md)                                               | Validate ARM PATCH operations.                                                                                                                                                                                                                        |
| [`@azure-tools/typespec-azure-resource-manager/resource-name`](../rules/resource-name.md)                                                         | Check the resource name.                                                                                                                                                                                                                              |
| [`@azure-tools/typespec-azure-resource-manager/retry-after`](../rules/retry-after.md)                                                             | Check if retry-after header appears in response body.                                                                                                                                                                                                 |
| [`@azure-tools/typespec-azure-resource-manager/unsupported-type`](../rules/unsupported-type.md)                                                   | Check for unsupported ARM types.                                                                                                                                                                                                                      |
| [`@azure-tools/typespec-azure-resource-manager/secret-prop`](../rules/secret-prop.md)                                                             | RPC-v1-13: Check that property with names indicating sensitive information(e.g. contains auth, password, token, secret, etc.) are marked with @secret decorator.                                                                                      |
| [`@azure-tools/typespec-azure-resource-manager/no-empty-model`](../rules/no-empty-model.md)                                                       | ARM Properties with type:object that don't reference a model definition are not allowed. ARM doesn't allow generic type definitions as this leads to bad customer experience.                                                                         |
| [`@azure-tools/typespec-azure-resource-manager/no-reserved-resource-property`](../rules/no-reserved-resource-property.md)                         | Reserved property names (for example 'billingData') must not be present in a resource's property bag. The property name is matched case-insensitively.                                                                                                |
