0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-12-15 20:31:58 +01:00

apply suggestions, disable annoying lint rules

This commit is contained in:
silverwind 2025-12-04 21:46:43 +01:00
parent 80e06d2b71
commit 45c17691d3
No known key found for this signature in database
GPG Key ID: 2E62B41C93869443
4 changed files with 3 additions and 11 deletions

View File

@ -77,7 +77,6 @@ linters:
- name: identical-branches
- name: if-return
- name: increment-decrement
- name: indent-error-flow
- name: modifies-value-receiver
- name: package-comments
- name: range

View File

@ -406,7 +406,7 @@ export default defineConfig([
'no-dupe-keys': [2],
'no-duplicate-case': [2],
'no-duplicate-imports': [0],
'no-else-return': [2],
'no-else-return': [0],
'no-empty-character-class': [2],
'no-empty-function': [0],
'no-empty-pattern': [2],

View File

@ -17,10 +17,6 @@
{{svg "octicon-mirror" $size}}
{{else if .Repo.IsFork}}
{{svg "octicon-repo-forked" $size}}
{{else if .Repo.IsPrivate}}
{{svg "octicon-repo-locked" $size}}
{{else if .Repo.IsTemplate}}
{{svg "octicon-repo-template" $size}}
{{else}}
{{svg "octicon-repo" $size}}
{{end}}

View File

@ -3,10 +3,7 @@ export function getRepoIcon(repo: Record<string, any>) {
return 'octicon-mirror';
} else if (repo.fork) {
return 'octicon-repo-forked';
} else if (repo.private) {
return 'octicon-repo-locked';
} else if (repo.template) {
return `octicon-repo-template`;
} else {
return 'octicon-repo';
}
return 'octicon-repo';
}