mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 19:16:58 +02:00
refactor: improve internal typing (#6507)
* refactor: improve internal typing * fix * fix test
This commit is contained in:
parent
58e07a6796
commit
2553f1fb5a
14 changed files with 165 additions and 132 deletions
|
@ -28,8 +28,7 @@ export function normalizeUrl(rawUrls: string[]): string {
|
|||
const replacement = urls[0].match(/^file:\/\/\//) ? '$1:///' : '$1://';
|
||||
urls[0] = urls[0].replace(/^([^/:]+):\/*/, replacement);
|
||||
|
||||
// eslint-disable-next-line
|
||||
for (let i = 0; i < urls.length; i++) {
|
||||
for (let i = 0; i < urls.length; i += 1) {
|
||||
let component = urls[i];
|
||||
|
||||
if (typeof component !== 'string') {
|
||||
|
@ -40,7 +39,7 @@ export function normalizeUrl(rawUrls: string[]): string {
|
|||
if (i === urls.length - 1 && hasEndingSlash) {
|
||||
resultArray.push('/');
|
||||
}
|
||||
// eslint-disable-next-line
|
||||
// eslint-disable-next-line no-continue
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue