mirror of
https://github.com/go-gitea/gitea.git
synced 2026-03-29 03:42:23 +00:00
- Enable a few more rules, fix issues. The 2 `value` issues are false-positives. - Add exact types for `window.pageData` and `window.notificationSettings`. - peerDependencyRules for eslint-plugin-github unrestricted, the plugin works in v10, but does not declare compatibility, pending https://github.com/github/eslint-plugin-github/issues/680. - Added [eslint-plugin-de-morgan](https://github.com/azat-io/eslint-plugin-de-morgan), no violations. --------- Signed-off-by: silverwind <me@silverwind.io> Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
74 lines
2.0 KiB
TypeScript
74 lines
2.0 KiB
TypeScript
interface JQuery {
|
|
areYouSure: any, // jquery.are-you-sure
|
|
fomanticExt: any; // fomantic extension
|
|
api: any, // fomantic
|
|
dimmer: any, // fomantic
|
|
dropdown: any; // fomantic
|
|
modal: any; // fomantic
|
|
tab: any; // fomantic
|
|
transition: any, // fomantic
|
|
search: any, // fomantic
|
|
}
|
|
|
|
interface JQueryStatic {
|
|
api: any, // fomantic
|
|
}
|
|
|
|
interface Element {
|
|
_tippy: import('tippy.js').Instance;
|
|
}
|
|
|
|
interface Window {
|
|
config: {
|
|
appUrl: string,
|
|
appSubUrl: string,
|
|
assetVersionEncoded: string,
|
|
assetUrlPrefix: string,
|
|
runModeIsProd: boolean,
|
|
customEmojis: Record<string, string>,
|
|
pageData: Record<string, any> & {
|
|
adminUserListSearchForm?: {
|
|
SortType: string,
|
|
StatusFilterMap: Record<string, string>,
|
|
},
|
|
citationFileContent?: string,
|
|
prReview?: {
|
|
numberOfFiles: number,
|
|
numberOfViewedFiles: number,
|
|
},
|
|
DiffFileTree?: import('./modules/diff-file.ts').DiffFileTreeData,
|
|
FolderIcon?: string,
|
|
FolderOpenIcon?: string,
|
|
repoLink?: string,
|
|
repoActivityTopAuthors?: any[],
|
|
pullRequestMergeForm?: Record<string, any>,
|
|
dashboardRepoList?: Record<string, any>,
|
|
},
|
|
notificationSettings: {
|
|
MinTimeout: number,
|
|
TimeoutStep: number,
|
|
MaxTimeout: number,
|
|
EventSourceUpdateTime: number,
|
|
},
|
|
enableTimeTracking: boolean,
|
|
mermaidMaxSourceCharacters: number,
|
|
i18n: Record<string, string>,
|
|
},
|
|
$: JQueryStatic,
|
|
jQuery: JQueryStatic,
|
|
htmx: typeof import('htmx.org').default,
|
|
_globalHandlerErrors: Array<ErrorEvent & PromiseRejectionEvent> & {
|
|
_inited: boolean,
|
|
push: (e: ErrorEvent & PromiseRejectionEvent) => void | number,
|
|
},
|
|
codeEditors: any[], // export editor for customization
|
|
localUserSettings: typeof import('./modules/user-settings.ts').localUserSettings,
|
|
|
|
// various captcha plugins
|
|
grecaptcha: any,
|
|
turnstile: any,
|
|
hcaptcha: any,
|
|
|
|
// do not add more properties here unless it is a must
|
|
}
|