mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-09 02:04:01 +09:00
Add typescript guideline and typescript-specific eslint plugins and fix issues (#31521)
1. Add some general guidelines how to write our typescript code 2. Add `@typescript-eslint/eslint-plugin`, general typescript rules 3. Add `eslint-plugin-deprecation` to detect deprecated code 4. Fix all new lint issues that came up
This commit is contained in:
@ -153,7 +153,7 @@ export function initRepoCodeView() {
|
||||
});
|
||||
|
||||
$(window).on('hashchange', () => {
|
||||
let m = rangeAnchorRegex.exec(window.location.hash.match);
|
||||
let m = rangeAnchorRegex.exec(window.location.hash);
|
||||
const $linesEls = $(getLineEls());
|
||||
let $first;
|
||||
if (m) {
|
||||
@ -170,7 +170,7 @@ export function initRepoCodeView() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
m = singleAnchorRegex.exec(window.location.hash.match);
|
||||
m = singleAnchorRegex.exec(window.location.hash);
|
||||
if (m) {
|
||||
$first = $linesEls.filter(`[rel=L${m[2]}]`);
|
||||
if ($first.length) {
|
||||
|
Reference in New Issue
Block a user