Skip to content

Commit

Permalink
docs: add an icon to display if a linter has a confiiguration or not
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jun 26, 2024
1 parent 2b8e3f0 commit 185e85c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/src/docs/usage/linters.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Linters
---

import { FaGithub, FaGitlab, FaArrowUp } from "react-icons/fa";
import { FaGithub, FaGitlab, FaArrowUp, FaCog } from "react-icons/fa";

To see a list of supported linters and which linters are enabled/disabled:

Expand Down
4 changes: 2 additions & 2 deletions scripts/website/expand_templates/linters.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ func getLintersListMarkdown(enabled bool) string {
func getName(lc *types.LinterWrapper) string {
name := spanWithID(listItemPrefix+lc.Name, "", "")

if hasSettings(lc.Name) {
name += fmt.Sprintf("[%[1]s](#%[1]s \"%[1]s configuration\")", lc.Name)
if hasSettings(lc.Name) && lc.Deprecation == nil {
name += fmt.Sprintf("[%[1]s&nbsp;%[2]s](#%[1]s \"%[1]s configuration\")", lc.Name, "<FaCog size={'0.8rem'} />")
} else {
name += fmt.Sprintf("%[1]s[%[2]s](#%[2]s \"%[2]s has no configuration\")", spanWithID(lc.Name, "", ""), lc.Name)
}
Expand Down

0 comments on commit 185e85c

Please sign in to comment.