Skip to content

Commit b52f17b

Browse files
committed
undo more lint changes to tests
1 parent bd45963 commit b52f17b

File tree

3 files changed

+49
-2941
lines changed

3 files changed

+49
-2941
lines changed

tests/integration/clientside/assets/clientside.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
if (!window.dash_clientside) {
2-
window.dash_clientside = {};
2+
window.dash_clientside = {}
33
}
44
window.dash_clientside.clientside = {
5-
add: function (a, b) {
5+
6+
add: function(a, b) {
67
return window.R.add(a, b);
78
},
89

@@ -16,7 +17,7 @@ window.dash_clientside.clientside = {
1617

1718
add1_break_at_11: function (value) {
1819
if (parseInt(value, 10) === 11) {
19-
throw new Error("Unexpected error");
20+
throw new Error('Unexpected error');
2021
}
2122
return parseInt(value, 10) + 1;
2223
},
@@ -35,71 +36,71 @@ window.dash_clientside.clientside = {
3536
return [parseInt(value2, 10) + 1, parseInt(value3, 10) + 1];
3637
},
3738

38-
add_to_four_outputs: function (value) {
39+
add_to_four_outputs: function(value) {
3940
return [
4041
parseInt(value) + 1,
4142
parseInt(value) + 2,
4243
parseInt(value) + 3,
43-
parseInt(value) + 4,
44-
];
44+
parseInt(value) + 4
45+
]
4546
},
4647

47-
side_effect_and_return_a_promise: function (value) {
48-
return new Promise(function (resolve, reject) {
49-
setTimeout(function () {
50-
setTimeout(function () {
51-
document.getElementById("side-effect").innerText =
52-
"side effect";
48+
side_effect_and_return_a_promise: function(value) {
49+
return new Promise(function(resolve, reject) {
50+
setTimeout(function() {
51+
setTimeout(function() {
52+
document.getElementById('side-effect').innerText = (
53+
'side effect'
54+
);
5355
}, 100);
54-
resolve("foo");
56+
resolve('foo');
5557
}, 1);
5658
});
5759
},
5860

59-
triggered_to_str: function (n_clicks0, n_clicks1) {
61+
triggered_to_str: function(n_clicks0, n_clicks1) {
6062
const triggered = dash_clientside.callback_context.triggered;
61-
return triggered.map((t) => `${t.prop_id} = ${t.value}`).join(", ");
63+
return triggered.map(t => `${t.prop_id} = ${t.value}`).join(', ');
6264
},
6365

64-
triggered_id_to_str: function (n_clicks0, n_clicks1) {
66+
triggered_id_to_str: function(n_clicks0, n_clicks1) {
6567
const triggered = dash_clientside.callback_context.triggered_id;
66-
const triggered_id =
67-
typeof triggered === "string" ? triggered : triggered.btn1;
68-
return triggered_id;
68+
const triggered_id = typeof triggered === "string" ? triggered : triggered.btn1
69+
return triggered_id
6970
},
7071

71-
inputs_to_str: function (n_clicks0, n_clicks1) {
72+
inputs_to_str: function(n_clicks0, n_clicks1) {
7273
const inputs = dash_clientside.callback_context.inputs;
7374
const keys = Object.keys(inputs);
74-
return keys.map((k) => `${k} = ${inputs[k]}`).join(", ");
75+
return keys.map(k => `${k} = ${inputs[k]}`).join(', ');
7576
},
7677

77-
inputs_list_to_str: function (n_clicks0, n_clicks1) {
78+
inputs_list_to_str: function(n_clicks0, n_clicks1) {
7879
return JSON.stringify(dash_clientside.callback_context.inputs_list);
7980
},
8081

81-
states_to_str: function (val0, val1, st0, st1) {
82+
states_to_str: function(val0, val1, st0, st1) {
8283
const states = dash_clientside.callback_context.states;
8384
const keys = Object.keys(states);
84-
return keys.map((k) => `${k} = ${states[k]}`).join(", ");
85+
return keys.map(k => `${k} = ${states[k]}`).join(', ');
8586
},
8687

87-
states_list_to_str: function (val0, val1, st0, st1) {
88+
states_list_to_str: function(val0, val1, st0, st1) {
8889
return JSON.stringify(dash_clientside.callback_context.states_list);
8990
},
9091

91-
input_output_callback: function (inputValue) {
92+
input_output_callback: function(inputValue) {
9293
const triggered = dash_clientside.callback_context.triggered;
93-
if (triggered.length == 0) {
94+
if (triggered.length==0){
9495
return inputValue;
9596
} else {
9697
return inputValue + 1;
9798
}
9899
},
99100

100-
input_output_follower: function (inputValue) {
101+
input_output_follower: function(inputValue) {
101102
if (!window.callCount) {
102-
window.callCount = 0;
103+
window.callCount = 0
103104
}
104105
window.callCount += 1;
105106
return inputValue.toString();

0 commit comments

Comments
 (0)