diff options
author | silverwind <me@silverwind.io> | 2024-07-03 17:48:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-03 17:48:14 +0200 |
commit | 2c92c7c5226e29636a1d47a277130f477fa2037b (patch) | |
tree | 2281cc2ca40fff4ecf241e485f7ed0e588407b35 /web_src/js/features/repo-code.js | |
parent | b270b30aebf42fb45d9a57288cf3dcbfa842a760 (diff) | |
download | gitea-2c92c7c5226e29636a1d47a277130f477fa2037b.tar.gz gitea-2c92c7c5226e29636a1d47a277130f477fa2037b.zip |
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
Diffstat (limited to 'web_src/js/features/repo-code.js')
-rw-r--r-- | web_src/js/features/repo-code.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/features/repo-code.js b/web_src/js/features/repo-code.js index f0f4ead125..658fa7e11c 100644 --- a/web_src/js/features/repo-code.js +++ b/web_src/js/features/repo-code.js @@ -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) { |