Skip to content

Commit cd580a4

Browse files
dkundelwell1791
authored andcommitted
Apply automatic ESLint changes based on arrow functions
1 parent bb5bfd8 commit cd580a4

File tree

484 files changed

+910
-938
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

484 files changed

+910
-938
lines changed

client/accept-call/accept-call.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Twilio.Device.incoming(function(conn) {
1+
Twilio.Device.incoming(conn => {
22
console.log('Incoming connection from ' + conn.parameters.From);
33
// accept the incoming connection and start two-way audio
44
conn.accept();

client/capability-token-2way/capability-token.2.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const twilio = require('twilio');
66
const app = express();
77
app.use(bodyParser.urlencoded({ extended: false }));
88

9-
app.get('/token', function(req, res) {
9+
app.get('/token', (req, res) => {
1010
// put your Twilio API credentials here
1111
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
1212
const authToken = 'your_auth_token';
@@ -23,7 +23,7 @@ app.get('/token', function(req, res) {
2323
res.send(token);
2424
});
2525

26-
app.post('/voice', function(req, res) {
26+
app.post('/voice', (req, res) => {
2727
// TODO: Create TwiML response
2828
});
2929

client/capability-token-incoming/capability-token.2.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const twilio = require('twilio');
44

55
const app = express();
66

7-
app.get('/token', function(req, res) {
7+
app.get('/token', (req, res) => {
88
// put your Twilio API credentials here
99
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
1010
const authToken = 'your_auth_token';
@@ -17,7 +17,7 @@ app.get('/token', function(req, res) {
1717
res.send(token);
1818
});
1919

20-
app.post('/voice', function(req, res) {
20+
app.post('/voice', (req, res) => {
2121
// TODO: Create TwiML response
2222
});
2323

client/capability-token-outgoing/capability-token.2.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const twilio = require('twilio');
44

55
const app = express();
66

7-
app.get('/token', function(req, res) {
7+
app.get('/token', (req, res) => {
88
// put your Twilio API credentials here
99
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
1010
const authToken = 'your_auth_token';
@@ -20,7 +20,7 @@ app.get('/token', function(req, res) {
2020
res.send(token);
2121
});
2222

23-
app.post('/voice', function(req, res) {
23+
app.post('/voice', (req, res) => {
2424
// TODO: Create TwiML response
2525
});
2626

client/capability-token/capability-token.2.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const twilio = require('twilio');
44

55
const app = express();
66

7-
app.get('/token', function(req, res) {
7+
app.get('/token', (req, res) => {
88
// put your Twilio API credentials here
99
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
1010
const authToken = 'your_auth_token';
@@ -21,7 +21,7 @@ app.get('/token', function(req, res) {
2121
res.send(token);
2222
});
2323

24-
app.post('/voice', function(req, res) {
24+
app.post('/voice', (req, res) => {
2525
// TODO: Create TwiML response
2626
});
2727

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Twilio.Device.setup(token);
22

3-
Twilio.Device.ready(function(device) {
3+
Twilio.Device.ready(device => {
44
console.log('Ready');
55
});
66

7-
Twilio.Device.error(function(error) {
7+
Twilio.Device.error(error => {
88
console.log('Error: ' + error.message);
99
});

client/reject-call/reject-call.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Twilio.Device.incoming(function(conn) {
1+
Twilio.Device.incoming(conn => {
22
console.log('Incoming connection from ' + conn.parameters.From);
33
const archEnemyPhoneNumber = '+15417280966';
44

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
$(function() {
1+
$(() => {
22
$.ajax('/token')
3-
.done(function(token) {
3+
.done(token => {
44
console.log('Got a token: ', token);
55
// TODO: Use token with Twilio Client
66
})
7-
.fail(function() {
7+
.fail(() => {
88
alert('Could not authenticate!');
99
});
1010
});

client/response-twiml-client/response-twiml-client.2.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const twilio = require('twilio');
66
const app = express();
77
app.use(bodyParser.urlencoded({ extended: false }));
88

9-
app.post('/voice', function(req, res) {
9+
app.post('/voice', (req, res) => {
1010
// Create TwiML response
1111
const twiml = new twilio.TwimlResponse();
1212

@@ -28,7 +28,7 @@ app.post('/voice', function(req, res) {
2828
res.send(twiml.toString());
2929
});
3030

31-
app.get('/token', function(req, res) {
31+
app.get('/token', (req, res) => {
3232
// TODO: generate token
3333
});
3434

client/response-twiml-dial/response-twiml-dial.2.x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const twilio = require('twilio');
66
const app = express();
77
app.use(bodyParser.urlencoded({ extended: false }));
88

9-
app.post('/voice', function(req, res) {
9+
app.post('/voice', (req, res) => {
1010
// Create TwiML response
1111
const twiml = new twilio.TwimlResponse();
1212

@@ -22,7 +22,7 @@ app.post('/voice', function(req, res) {
2222
res.send(twiml.toString());
2323
});
2424

25-
app.get('/token', function(req, res) {
25+
app.get('/token', (req, res) => {
2626
// TODO: generate token
2727
});
2828

0 commit comments

Comments
 (0)