mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 09:06:46 +09:00
chore(lint): apply the main eslint config to vue files (#39545)
Vue files only got `eslint-plugin-vue` rules, so stylistic and TypeScript rules never ran on them, and `import-x` could not see cycles between `.ts` and `.vue` files. - Apply the main ESLint config to `.vue` files - Let `import-x` parse `.vue` files, which surfaced a cycle between `repo-findfile.ts` and `RepoFileSearch.vue` - Fix the resulting lint issues `vue-eslint-parser` is added as a direct dependency because `import-x` resolves parsers by package name, see https://github.com/un-ts/eslint-plugin-import-x/issues/381.
This commit is contained in:
1 parent
986b0bcae0
commit
99573bde0e
12 files changed
+115
-112
No files matched your search
@@ -12,13 +12,13 @@ type Commit = {
|
||||
committer_or_author_name: string,
|
||||
time: string,
|
||||
short_sha: string,
|
||||
}
|
||||
};
|
||||
|
||||
type CommitListResult = {
|
||||
commits: Array<Commit>,
|
||||
last_review_commit_sha: string,
|
||||
locale: Record<string, string>,
|
||||
}
|
||||
};
|
||||
|
||||
const elRoot = useTemplateRef('elRoot') as Readonly<ShallowRef<HTMLDivElement>>;
|
||||
const elExpandBtn = useTemplateRef('elExpandBtn') as Readonly<ShallowRef<HTMLButtonElement>>;
|
||||
@@ -154,7 +154,7 @@ async function fetchCommits() {
|
||||
commits.value.push(...results.commits);
|
||||
commits.value.reverse();
|
||||
lastReviewCommitSha.value = results.last_review_commit_sha || null;
|
||||
if (lastReviewCommitSha.value && !commits.value.some((x) => x.id === lastReviewCommitSha.value)) {
|
||||
if (lastReviewCommitSha.value && commits.value.every((x) => x.id !== lastReviewCommitSha.value)) {
|
||||
// the lastReviewCommit is not available (probably due to a force push)
|
||||
// reset the last review commit sha
|
||||
lastReviewCommitSha.value = null;
|
||||
|
||||
Reference in new issue
Block a user