Content-Length: 277505 | pFad | https://github.com/eslint/eslint/commit/60c3e2cf9256f3676b7934e26ff178aaf19c9e97

E1 fix: sort keys in eslint-suppressions.json to avoid git churn (#19711) · eslint/eslint@60c3e2c · GitHub
Skip to content

Commit 60c3e2c

Browse files
authored
fix: sort keys in eslint-suppressions.json to avoid git churn (#19711)
fix: sort keys in eslint-suppressions.json to avoid `git` churn/conflicts
1 parent 4c289e6 commit 60c3e2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/services/suppressions-service.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
const fs = require("node:fs");
1313
const path = require("node:path");
1414
const { calculateStatsPerFile } = require("../eslint/eslint-helpers");
15+
const stringify = require("json-stable-stringify-without-jsonify");
1516

1617
//------------------------------------------------------------------------------
1718
// Typedefs
@@ -224,7 +225,7 @@ class SuppressionsService {
224225
save(suppressions) {
225226
return fs.promises.writeFile(
226227
this.filePath,
227-
JSON.stringify(suppressions, null, 2),
228+
stringify(suppressions, { space: 2 }),
228229
);
229230
}
230231

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/eslint/eslint/commit/60c3e2cf9256f3676b7934e26ff178aaf19c9e97

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy