Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3405fb94
Unverified
Commit
3405fb94
authored
Jul 28, 2020
by
Christopher Robert Van Wiemeersch
Committed by
GitHub
Jul 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo in `eslint-plugin-next` code comments (#15583)
(p.s. excited to use this package. thank you.)
parent
059741ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
url.js
packages/eslint-plugin-next/lib/utils/url.js
+4
-4
No files found.
packages/eslint-plugin-next/lib/utils/url.js
View file @
3405fb94
...
@@ -55,9 +55,9 @@ function parseUrlForPages(urlprefix, directory) {
...
@@ -55,9 +55,9 @@ function parseUrlForPages(urlprefix, directory) {
}
}
/**
/**
* Takes a
url
and does the following things.
* Takes a
URL
and does the following things.
* -
replace
`index.html` with `/`
* -
Replaces
`index.html` with `/`
* - Makes sure all URLs are have a trai
ni
ling `/`
* - Makes sure all URLs are have a trailing `/`
* - Removes query string
* - Removes query string
* @param {string} url
* @param {string} url
*/
*/
...
@@ -68,7 +68,7 @@ function normalizeURL(url) {
...
@@ -68,7 +68,7 @@ function normalizeURL(url) {
url
=
url
.
split
(
'?'
)[
0
]
url
=
url
.
split
(
'?'
)[
0
]
url
=
url
.
split
(
'#'
)[
0
]
url
=
url
.
split
(
'#'
)[
0
]
url
=
url
=
url
.
replace
(
/
(\/
index
\.
html
)
$/
,
'/'
)
url
=
url
=
url
.
replace
(
/
(\/
index
\.
html
)
$/
,
'/'
)
//
e
mpty URLs should not be trailed with `/`, e.g. `#heading`
//
E
mpty URLs should not be trailed with `/`, e.g. `#heading`
if
(
url
===
''
)
{
if
(
url
===
''
)
{
return
url
return
url
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment