Skip to content

Commit 13b1d61

Browse files
Adopt multilineArraysWrapThreshold to always wrap arrays
1 parent fe2f927 commit 13b1d61

27 files changed

+2285
-575
lines changed

.github/scripts/diff-directories.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ function readFilesRecursively(directory) {
1313

1414
if (fileStats.isDirectory()) {
1515
const nestedFiles = readFilesRecursively(filePath);
16-
for (const [nestedFilePath, nestedFileContent] of Object.entries(nestedFiles)) {
16+
for (const [
17+
nestedFilePath,
18+
nestedFileContent,
19+
] of Object.entries(nestedFiles)) {
1720
files[path.join(filename, nestedFilePath)] = nestedFileContent;
1821
}
1922
} else {
@@ -64,7 +67,10 @@ function displayDiffs(dir1Files, dir2Files, isOpen) {
6467
rollupGrouping[summary].files.push(fileName);
6568
rollupGrouping[summary].string = string;
6669
}
67-
for (const [filePath, fileContent] of Object.entries(dir1Files)) {
70+
for (const [
71+
filePath,
72+
fileContent,
73+
] of Object.entries(dir1Files)) {
6874
let diffOut = '';
6975
let compareOut;
7076
if (filePath in dir2Files) {
@@ -145,7 +151,10 @@ const sections = {
145151
latest: {},
146152
};
147153
function sortFiles(dirFiles, dirName) {
148-
for (const [filePath, fileContent] of Object.entries(dirFiles)) {
154+
for (const [
155+
filePath,
156+
fileContent,
157+
] of Object.entries(dirFiles)) {
149158
if (filePath.startsWith(`v${CURRENT_CONFIG_VERSION}`)) {
150159
sections.latest[dirName] = sections.latest[dirName] || {};
151160
sections.latest[dirName][filePath] = fileContent;
@@ -164,7 +173,10 @@ if (!fs.existsSync(`${dir1}/v${CURRENT_CONFIG_VERSION}`)) {
164173
sortFiles(readFilesRecursively(dir1), 'dir1');
165174
sortFiles(readFilesRecursively(dir2), 'dir2');
166175

167-
for (const [section, files] of Object.entries(sections)) {
176+
for (const [
177+
section,
178+
files,
179+
] of Object.entries(sections)) {
168180
const isOpen = section === 'latest';
169181
const fileOut = displayDiffs(files.dir1, files.dir2, isOpen);
170182
console.log(renderDetails(section, fileOut, isOpen));

.prettierrc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
"singleQuote": true,
33
"printWidth": 140,
4-
"tabWidth": 4
4+
"tabWidth": 4,
5+
"multilineArraysWrapThreshold": 1,
6+
"plugins": [
7+
"prettier-plugin-multiline-arrays"
8+
]
59
}

eslint.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import json from 'eslint-plugin-json';
55
export default [
66
...ddgConfig,
77
{
8-
files: ['**/*.json'],
8+
files: [
9+
'**/*.json',
10+
],
911
...json.configs.recommended,
1012
},
1113
{

features/amp-links.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@
3131
"^https?:\\/\\/(?:w{3}\\.)?google\\.\\S{2,}\\/amp\\/s\\/(\\S+)$",
3232
"^https?:\\/\\/\\S+ampproject\\.org\\/\\S\\/s\\/(\\S+)$"
3333
],
34-
"keywords": ["amp=", "=amp", "&amp", "amp&", "/amp", "amp/", ".amp", "amp.", "%amp", "amp%", "_amp", "amp_", "?amp"]
34+
"keywords": [
35+
"amp=",
36+
"=amp",
37+
"&amp",
38+
"amp&",
39+
"/amp",
40+
"amp/",
41+
".amp",
42+
"amp.",
43+
"%amp",
44+
"amp%",
45+
"_amp",
46+
"amp_",
47+
"?amp"
48+
]
3549
}
3650
}

features/autoconsent.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,9 @@
493493
}
494494
],
495495
"settings": {
496-
"disabledCMPs": ["healthline-media"],
496+
"disabledCMPs": [
497+
"healthline-media"
498+
],
497499
"filterlistExceptions": [
498500
"google.ae",
499501
"google.at",

features/click-to-load.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,10 +898,14 @@
898898
],
899899
"settings": {
900900
"Facebook, Inc.": {
901-
"ruleActions": ["block-ctl-fb"]
901+
"ruleActions": [
902+
"block-ctl-fb"
903+
]
902904
},
903905
"Youtube": {
904-
"ruleActions": ["block-ctl-yt"]
906+
"ruleActions": [
907+
"block-ctl-yt"
908+
]
905909
}
906910
}
907911
}

features/click-to-play.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"settings": {
1111
"Facebook": {
1212
"clicksBeforeSimpleVersion": 3,
13-
"ruleActions": ["block-ctl-fb"]
13+
"ruleActions": [
14+
"block-ctl-fb"
15+
]
1416
}
1517
}
1618
}

features/cookie.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535
"threshold": 604800,
3636
"maxAge": 604800
3737
},
38-
"thirdPartyCookieNames": ["user_id", "__Secure-3PAPISID", "SAPISID", "APISID"]
38+
"thirdPartyCookieNames": [
39+
"user_id",
40+
"__Secure-3PAPISID",
41+
"SAPISID",
42+
"APISID"
43+
]
3944
},
4045
"exceptions": [
4146
{

features/duck-player.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,29 @@
2424
"youtubePath": "watch",
2525
"youtubeEmbedUrl": "youtube-nocookie.com",
2626
"youTubeUrl": "youtube.com",
27-
"youTubeReferrerHeaders": ["Referer"],
28-
"youTubeReferrerQueryParams": ["embeds_referring_euri"],
27+
"youTubeReferrerHeaders": [
28+
"Referer"
29+
],
30+
"youTubeReferrerQueryParams": [
31+
"embeds_referring_euri"
32+
],
2933
"youTubeVideoIDQueryParam": "v",
3034
"overlays": {
3135
"youtube": {
3236
"state": "disabled",
3337
"selectors": {
3438
"thumbLink": "a[href^='/watch']",
35-
"excludedRegions": ["#playlist", "ytd-movie-renderer", "ytd-grid-movie-renderer"],
39+
"excludedRegions": [
40+
"#playlist",
41+
"ytd-movie-renderer",
42+
"ytd-grid-movie-renderer"
43+
],
3644
"videoElement": "#player video",
3745
"videoElementContainer": "#player .html5-video-player",
3846
"hoverExcluded": [],
39-
"clickExcluded": ["ytd-thumbnail-overlay-toggle-button-renderer"],
47+
"clickExcluded": [
48+
"ytd-thumbnail-overlay-toggle-button-renderer"
49+
],
4050
"allowedEventTargets": [
4151
".ytp-inline-preview-scrim",
4252
".ytd-video-preview",

features/element-hiding.json

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,23 @@
506506
"reason": "https://github.com/duckduckgo/privacy-configuration/pull/2821"
507507
}
508508
],
509-
"hideTimeouts": [0, 100, 300, 500, 1000, 1500, 2000, 3000, 5000],
510-
"unhideTimeouts": [1250, 2250, 3250, 5250],
509+
"hideTimeouts": [
510+
0,
511+
100,
512+
300,
513+
500,
514+
1000,
515+
1500,
516+
2000,
517+
3000,
518+
5000
519+
],
520+
"unhideTimeouts": [
521+
1250,
522+
2250,
523+
3250,
524+
5250
525+
],
511526
"mediaAndFormSelectors": "video,canvas,embed,object,audio,map,form,input,textarea,select,option",
512527
"adLabelStrings": [
513528
"ad",
@@ -1274,7 +1289,14 @@
12741289
]
12751290
},
12761291
{
1277-
"domain": ["ebay.com", "ebay.ca", "ebay.co.uk", "ebay.de", "ebay.fr", "ebay.com.au"],
1292+
"domain": [
1293+
"ebay.com",
1294+
"ebay.ca",
1295+
"ebay.co.uk",
1296+
"ebay.de",
1297+
"ebay.fr",
1298+
"ebay.com.au"
1299+
],
12781300
"rules": [
12791301
{
12801302
"selector": "#g-yolo-overlay-holder",

features/harmful-apis.json

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@
99
"settings": {
1010
"deviceOrientation": {
1111
"state": "enabled",
12-
"filterEvents": ["deviceorientation", "devicemotion"]
12+
"filterEvents": [
13+
"deviceorientation",
14+
"devicemotion"
15+
]
1316
},
1417
"GenericSensor": {
1518
"state": "enabled",
16-
"filterPermissions": ["accelerometer", "ambient-light-sensor", "gyroscope", "magnetometer"],
19+
"filterPermissions": [
20+
"accelerometer",
21+
"ambient-light-sensor",
22+
"gyroscope",
23+
"magnetometer"
24+
],
1725
"blockSensorStart": true
1826
},
1927
"UaClientHints": {
@@ -42,13 +50,20 @@
4250
},
4351
"WindowPlacement": {
4452
"state": "enabled",
45-
"filterPermissions": ["window-placement", "window-management"],
53+
"filterPermissions": [
54+
"window-placement",
55+
"window-management"
56+
],
4657
"screenIsExtended": false
4758
},
4859
"WebBluetooth": {
4960
"state": "enabled",
50-
"filterPermissions": ["bluetooth"],
51-
"filterEvents": ["availabilitychanged"],
61+
"filterPermissions": [
62+
"bluetooth"
63+
],
64+
"filterEvents": [
65+
"availabilitychanged"
66+
],
5267
"blockGetAvailability": true,
5368
"blockRequestDevice": true
5469
},
@@ -63,11 +78,15 @@
6378
},
6479
"WebMidi": {
6580
"state": "enabled",
66-
"filterPermissions": ["midi"]
81+
"filterPermissions": [
82+
"midi"
83+
]
6784
},
6885
"IdleDetection": {
6986
"state": "enabled",
70-
"filterPermissions": ["idle-detection"]
87+
"filterPermissions": [
88+
"idle-detection"
89+
]
7190
},
7291
"WebNfc": {
7392
"state": "enabled",
@@ -77,7 +96,11 @@
7796
},
7897
"StorageManager": {
7998
"state": "enabled",
80-
"allowedQuotaValues": [1073741824, 4294967296, 9999999999]
99+
"allowedQuotaValues": [
100+
1073741824,
101+
4294967296,
102+
9999999999
103+
]
81104
},
82105
"domains": []
83106
},

0 commit comments

Comments
 (0)