+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

docs(website): turn a rule on #3099

Merged
merged 2 commits into from
Aug 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion website/src/_includes/docs/project-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,29 @@ A rule can be configured for multiple purposes:
- turn the rule off;
- pass possible options to customize the rule;

#### Turn a rule on

Rules that are recommended are enabled by default. Rules that are not recommended
are not enabled, but they should be enabled via configuration.

To enable rules, you need to change their diagnostics severity based on your needs:

```json
{
"linter": {
"enabled": true,
"rules": {
"js": {
"rules": {
"noDeadCode": "error",
"useCamelCase": "warn"
}
}
}
}
}
```

#### Turn a rule off

Just add `"off"` as value inside its configuration. For example:
Expand Down Expand Up @@ -245,7 +268,7 @@ Just add `"warn"` as value of the rule. Example:
},
"regex": {
"rules": {
"noMultipleSpacesInRegularExpressionLiterals": "warn"
"noMultipleSpacesInRegularExpressionLiterals": "error"
}
}
}
Expand Down
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载