---
schema_version: "1"
id: 56aa3b3ccb0adeb023074c93fcc4d98118bad49aca5f947a1320dc8a73a70176
title: Autofix Your Code
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/lwc/slds_linter/guides/use/use-autofix-code.md
canonical_url: https://developer.salesforce.com/docs/platform/slds-linter/guide/use-autofix-code.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: ef9a21ac6fc1d54b96fc1874314b18fa2772d139597d4f7990b5bd3917c18ec2
products:
  - SLDS Linter
  - lwc
---
# Autofix Your Code

You’ve produced an SLDS Linter SARIF report, read through the report and identified the issues to fix and the components to update.
Fix validation issues automatically in bulk by running the `lint` command with the `--fix` option. The volume of issues that SLDS Linter can autofix depends on the extent of customizations done in your environment. After autofixing, generate a new SARIF report to see the remaining issues.

Here are a few different use cases for the `lint --fix` command.

Fix all files in current directory:

```
npx @salesforce-ux/slds-linter@latest lint --fix
```

Fix all files in a specific directory:

```
npx @salesforce-ux/slds-linter@latest lint "com/CORE/**" --fix
```

Fix issues by using custom configuration files. Send the configuration files to the `lint` command, and run the command with the `--fix` option:

```
npx @salesforce-ux/slds-linter@latest lint --config-eslint .eslintrc.yml --fix
```

Fix files with specific file types:

```
npx @salesforce-ux/slds-linter@latest lint "*/.{html,cmp}" --fix
```
