chore(lint): Enable no-return-assign except-parens.
This commit is contained in:
Родитель
a8b989464e
Коммит
61f828d132
|
@ -117,6 +117,7 @@
|
|||
"no-octal-escape": 2,
|
||||
"no-path-concat": 2,
|
||||
"no-proto": 2,
|
||||
"no-return-assign": [2, "except-parens"],
|
||||
"no-script-url": 2,
|
||||
"no-self-compare": 2,
|
||||
"no-sequences": 2,
|
||||
|
|
|
@ -82,7 +82,8 @@ PreviewProvider.prototype = {
|
|||
// filter out the allowed query params and update the query string
|
||||
newURL.search = Array.from(queryParams.keys())
|
||||
.filter(param => ALLOWED_QUERY_PARAMS.has(param))
|
||||
.map(param => param = param + "=" + queryParams.get(param)).join("&");
|
||||
.map(param => param + "=" + queryParams.get(param))
|
||||
.join("&");
|
||||
}
|
||||
|
||||
// remove extra slashes then construct back a safe pathname
|
||||
|
|
|
@ -25,7 +25,7 @@ const DEFAULT_TEST_EXPERIMENTS = {
|
|||
let experimentProvider;
|
||||
|
||||
function setup(clientID = DEFAULT_CLIENT_ID, experiments = DEFAULT_TEST_EXPERIMENTS, n) {
|
||||
return experimentProvider = new ExperimentProvider(clientID, experiments, n && (() => n));
|
||||
return (experimentProvider = new ExperimentProvider(clientID, experiments, n && (() => n)));
|
||||
}
|
||||
|
||||
exports["test ExperimentProvider"] = assert => {
|
||||
|
|
|
@ -49,7 +49,7 @@ exports.test_only_request_links_once = function*(assert) {
|
|||
)
|
||||
);
|
||||
// count the times each url has been requested
|
||||
data.urls.forEach(url => urlsRequested[url] = (urlsRequested[url] + 1) || 1);
|
||||
data.urls.forEach(url => (urlsRequested[url] = (urlsRequested[url] + 1) || 1));
|
||||
response.setHeader("Content-Type", "application/json", false);
|
||||
response.write(JSON.stringify({"urls": {urlsRequested}}));
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче