Skip to content

Commit 9877328

Browse files
committed
More lint fixups from mozilla-central.
I got some pushback from the linting team about excluding these from linting in m-c, so here we are.
1 parent a1298e5 commit 9877328

File tree

11 files changed

+8753
-2277
lines changed

11 files changed

+8753
-2277
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"context": {
3-
"app_id": "org.mozilla.fenix",
4-
"app_name": "fenix",
5-
"channel": "nightly",
6-
"locale": "en-US"
7-
},
8-
"collection_name": "nimbus-mobile-experiments",
9-
"client_id": "{2204ac0e-1428-11eb-adc1-0242ac120002}"
2+
"context": {
3+
"app_id": "org.mozilla.fenix",
4+
"app_name": "fenix",
5+
"channel": "nightly",
6+
"locale": "en-US"
7+
},
8+
"collection_name": "nimbus-mobile-experiments",
9+
"client_id": "{2204ac0e-1428-11eb-adc1-0242ac120002}"
1010
}

components/support/nimbus-cli/assets/index.html

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@
33
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
44

55
<html>
6-
<head>
7-
<title>nimbus-cli test server</title>
8-
<link href="/style.css" rel="stylesheet" />
9-
<script src="/script.js" ></script>
10-
</head>
11-
<body>
12-
<ul id="platform-list">
13-
{android}
14-
{ios}
15-
{web}
16-
</ul>
17-
<div class="wrapper">
18-
<button id="the-only-button" onclick="onClick()"></button>
19-
</div>
20-
</body>
6+
<head>
7+
<title>nimbus-cli test server</title>
8+
<link href="/style.css" rel="stylesheet" />
9+
<script src="/script.js"></script>
10+
</head>
11+
<body>
12+
<ul id="platform-list">
13+
{android} {ios} {web}
14+
</ul>
15+
<div class="wrapper">
16+
<button id="the-only-button" onclick="onClick()"></button>
17+
</div>
18+
</body>
2119
</html>

components/support/nimbus-cli/assets/script.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,31 @@
33
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
44

55
function onReload() {
6-
const uaString = window.navigator.userAgent.toLowerCase();
7-
let el;
8-
if (uaString.indexOf("iphone") >= 0) {
9-
el = document.getElementById("ios-latest");
10-
} else if (uaString.indexOf("android") >= 0) {
11-
el = document.getElementById("android-latest");
12-
} else {
13-
el = document.getElementById("web-latest");
14-
}
6+
const uaString = window.navigator.userAgent.toLowerCase();
7+
let el;
8+
if (uaString.includes("iphone")) {
9+
el = document.getElementById("ios-latest");
10+
} else if (uaString.includes("android")) {
11+
el = document.getElementById("android-latest");
12+
} else {
13+
el = document.getElementById("web-latest");
14+
}
1515

16-
const button = document.getElementById("the-only-button");
17-
if (el) {
18-
button.textContent = String.fromCodePoint(0x25B6);
19-
el.click()
20-
} else {
21-
button.textContent = String.fromCodePoint(0x1F504);
22-
}
16+
const button = document.getElementById("the-only-button");
17+
if (el) {
18+
button.textContent = String.fromCodePoint(0x25b6);
19+
el.click();
20+
} else {
21+
button.textContent = String.fromCodePoint(0x1f504);
22+
}
2323
}
2424

2525
function onClick() {
26-
window.location.reload();
26+
window.location.reload();
2727
}
2828

29-
window.addEventListener("DOMContentLoaded", (event) => {
30-
console.log("DOM fully loaded and parsed");
31-
onReload()
29+
window.addEventListener("DOMContentLoaded", () => {
30+
// eslint-disable-next-line no-console
31+
console.log("DOM fully loaded and parsed");
32+
onReload();
3233
});

components/support/nimbus-cli/test/fixtures/fenix-nimbus-validation-v3.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
"channel": "nightly",
3434
"endDate": "2021-02-11",
3535
"enrollmentEndDate": "2021-02-11",
36-
"featureIds": [
37-
"no-feature-fenix"
38-
],
36+
"featureIds": ["no-feature-fenix"],
3937
"featureValidationOptOut": false,
4038
"id": "fenix-nimbus-validation-v3",
4139
"isEnrollmentPaused": false,

components/support/nimbus-fml/ExperimentFeatureManifest.schema.json

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,7 @@
3232
"properties": {
3333
"type": {
3434
"type": "string",
35-
"enum": [
36-
"json",
37-
"boolean",
38-
"int",
39-
"string"
40-
]
35+
"enum": ["json", "boolean", "int", "string"]
4136
},
4237
"fallbackPref": {
4338
"type": "string"
@@ -50,19 +45,13 @@
5045
"description": "Explain how this value is being used"
5146
}
5247
},
53-
"required": [
54-
"type",
55-
"description"
56-
],
48+
"required": ["type", "description"],
5749
"additionalProperties": false
5850
}
5951
}
6052
}
6153
},
62-
"required": [
63-
"description",
64-
"hasExposure"
65-
],
54+
"required": ["description", "hasExposure"],
6655
"if": {
6756
"properties": {
6857
"hasExposure": {
@@ -71,9 +60,7 @@
7160
}
7261
},
7362
"then": {
74-
"required": [
75-
"exposureDescription"
76-
]
63+
"required": ["exposureDescription"]
7764
}
7865
}
7966
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"component-string": "Partial example for imported feature from JSON file"
2+
"component-string": "Partial example for imported feature from JSON file"
33
}

components/support/nimbus-fml/fixtures/ir/app_menu.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,7 @@
9999
"Enum": "MenuItemId"
100100
}
101101
},
102-
"default": [
103-
"resume-game",
104-
"start-game",
105-
"community",
106-
"settings"
107-
]
102+
"default": ["resume-game", "start-game", "community", "settings"]
108103
},
109104
{
110105
"name": "all-menu-items",
@@ -120,7 +115,7 @@
120115
"deeplink": "deeplink://start"
121116
},
122117
{
123-
"label":"Resume Game",
118+
"label": "Resume Game",
124119
"deeplink": "deeplink://start?continue=true"
125120
}
126121
]
@@ -161,7 +156,9 @@
161156
"name": "profile-ordering",
162157
"doc": "",
163158
"type": {
164-
"List": {"EnumMap": [{"Enum": "PlayerProfile"}, {"Enum": "MenuItemId"}]}
159+
"List": {
160+
"EnumMap": [{ "Enum": "PlayerProfile" }, { "Enum": "MenuItemId" }]
161+
}
165162
},
166163
"default": [
167164
{

components/support/nimbus-fml/fixtures/ir/full_homescreen.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@
6767
"Enum": "HomeScreenSection"
6868
}
6969
},
70-
"default": [
71-
"top-sites",
72-
"jump-back-in",
73-
"recently-saved"
74-
]
70+
"default": ["top-sites", "jump-back-in", "recently-saved"]
7571
}
7672
],
7773
"default": null,

components/support/nimbus-fml/fixtures/ir/simple_nimbus_validation.json

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,7 @@
9393
"type": {
9494
"List": "Int"
9595
},
96-
"default": [
97-
1,
98-
2,
99-
3
100-
]
96+
"default": [1, 2, 3]
10197
},
10298
{
10399
"name": "enum-list",
@@ -107,10 +103,7 @@
107103
"Enum": "Position"
108104
}
109105
},
110-
"default": [
111-
"top",
112-
"bottom"
113-
]
106+
"default": ["top", "bottom"]
114107
}
115108
],
116109
"default": null,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"my/remote": "https://example.com/repo/branch",
3-
"test/nested2": "v100.0"
2+
"my/remote": "https://example.com/repo/branch",
3+
"test/nested2": "v100.0"
44
}

0 commit comments

Comments
 (0)