File tree Expand file tree Collapse file tree 2 files changed +21
-16
lines changed
docs/src/@rocketseat/gatsby-theme-docs/src/styles
scripts/website/expand_templates Expand file tree Collapse file tree 2 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ export default function GlobalStyle() {
6666 font-weight : 400 ;
6767 }
6868
69+ span .inline-code ,
6970 code .inline-code {
7071 display : inline-block;
7172 vertical-align : middle;
Original file line number Diff line number Diff line change @@ -10,22 +10,26 @@ import (
1010
1111const exclusionTmpl = `{{- $tick := "` + "`" + `" -}}
1212{{- range $name, $rules := . }}
13- ### {{ $tick }}{{ $name }}{{ $tick }}
14- {{ range $rule := $rules }}
15- {{ $tick }}{{ range $linter := $rule.Linters }}{{ $linter }}{{ end }}{{ $tick }}:
16- {{ if $rule.Path -}}
17- - Path: {{ $tick }}{{ $rule.Path }}{{ $tick }}
18- {{ end -}}
19- {{ if $rule.PathExcept -}}
20- - Path Except: {{ $tick }}{{ $rule.PathExcept }}{{ $tick }}
21- {{ end -}}
22- {{ if $rule.Text -}}
23- - Text: {{ $tick }}{{ $rule.Text }}{{ $tick }}
24- {{ end -}}
25- {{ if $rule.Source -}}
26- - Source: {{ $tick }}{{ $rule.Source }}{{ $tick }}
27- {{ end -}}
28- {{ end }}{{ end }}`
13+ ### Preset {{ $tick }}{{ $name }}{{ $tick }}
14+
15+ <table>
16+ <thead>
17+ <tr>
18+ <th>Linter</th>
19+ <th>Issue Text</th>
20+ </tr>
21+ </thead>
22+ <tbody>
23+ {{- range $rule := $rules }}
24+ <tr>
25+ <td>{{ range $linter := $rule.Linters }}{{ $linter }}{{ end }}</td>
26+ <td><span class="inline-code">{{ if $rule.Text }}{{ $rule.Text }}{{ end }}</span></td>
27+ </tr>
28+ {{- end }}
29+ </tbody>
30+ </table>
31+
32+ {{ end }}`
2933
3034func getExclusionPresets () (string , error ) {
3135 linterExclusionPresets , err := readJSONFile [map [string ][]types.ExcludeRule ](filepath .Join ("assets" , "exclusion-presets.json" ))
You can’t perform that action at this time.
0 commit comments