Skip to content

Commit 991f181

Browse files
authoredMay 17, 2023
fix: equality check eslintrc-auto-import.json (#371)
1 parent 842cac3 commit 991f181

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎src/core/ctx.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ ${dts}`.trim()}\n`
151151
if (eslintrc.enabled && eslintrc.filepath) {
152152
promises.push(
153153
generateESLint().then((content) => {
154-
if (content !== lastESLint) {
155-
lastESLint = `${content}\n`
154+
content = `${content}\n`
155+
if (content.trim() !== lastESLint?.trim()) {
156+
lastESLint = content
156157
return writeFile(eslintrc.filepath!, content)
157158
}
158159
}),

0 commit comments

Comments
 (0)
Please sign in to comment.