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
338e08b4
Commit
338e08b4
authored
Dec 11, 2019
by
Joe Haddad
Committed by
JJ Kasper
Dec 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust Commit Linting Hook (#9694)
parent
e11cf227
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
.prettierignore_staged
.prettierignore_staged
+3
-0
lint-staged.config.js
lint-staged.config.js
+5
-3
No files found.
.prettierignore_staged
0 → 100644
View file @
338e08b4
**/.next/**
**/_next/**
**/dist/**
lint-staged.config.js
View file @
338e08b4
...
@@ -7,8 +7,10 @@ module.exports = {
...
@@ -7,8 +7,10 @@ module.exports = {
.
map
(
filename
=>
`"
${
isWin
?
filename
:
escape
([
filename
])}
"`
)
.
map
(
filename
=>
`"
${
isWin
?
filename
:
escape
([
filename
])}
"`
)
.
join
(
' '
)
.
join
(
' '
)
return
[
return
[
`prettier --write
${
escapedFileNames
}
`
,
`prettier --with-node-modules --ignore-path='./.prettierignore_staged' --write
${
escapedFileNames
}
`
,
`eslint --max-warnings=0 --fix
${
filenames
.
map
(
f
=>
`"
${
f
}
"`
).
join
(
' '
)}
`
,
`eslint --no-ignore --max-warnings=0 --fix
${
filenames
.
map
(
f
=>
`"
${
f
}
"`
)
.
join
(
' '
)}
`
,
`git add
${
escapedFileNames
}
`
,
`git add
${
escapedFileNames
}
`
,
]
]
},
},
...
@@ -17,7 +19,7 @@ module.exports = {
...
@@ -17,7 +19,7 @@ module.exports = {
.
map
(
filename
=>
`"
${
isWin
?
filename
:
escape
([
filename
])}
"`
)
.
map
(
filename
=>
`"
${
isWin
?
filename
:
escape
([
filename
])}
"`
)
.
join
(
' '
)
.
join
(
' '
)
return
[
return
[
`prettier --write
${
escapedFileNames
}
`
,
`prettier --w
ith-node-modules --ignore-path='./.prettierignore_staged' --w
rite
${
escapedFileNames
}
`
,
`git add
${
escapedFileNames
}
`
,
`git add
${
escapedFileNames
}
`
,
]
]
},
},
...
...
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