Skip to content

Commit 88de4e7

Browse files
committed
Code style fixes related to new eslint configs
1 parent f8db536 commit 88de4e7

7 files changed

Lines changed: 15 additions & 2 deletions

File tree

JavaScript/1-HTTP/api/move.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const move = (point, x, y) => {
24
point.x += x;
35
point.y += y;

JavaScript/1-HTTP/api/read.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = async name => {
24
const shape = memory.get(name);
35
if (!shape) return 'Shape is not found';

JavaScript/1-HTTP/api/rect.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
class Point {
24
constructor(x, y) {
35
this.x = x;

JavaScript/1-HTTP/api/render.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
module.exports = async name => {
24
const shape = memory.get(name);
35
if (!shape) return 'Shape is not found';

JavaScript/1-HTTP/api/resize.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const resize = (point, k) => {
24
let { x, y } = point;
35
x *= k;

JavaScript/1-HTTP/api/rotate.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
const rotate = (point, angle) => {
24
const sin = Math.sin(angle);
35
const cos = Math.cos(angle);

JavaScript/1-HTTP/static/client.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const buildAPI = methods => {
2323
return api;
2424
};
2525

26+
const api = buildAPI(['rect', 'move', 'rotate', 'read', 'render', 'resize']);
27+
2628
const show = async () => {
2729
const svg = await api.render('Rect1');
2830
const output = document.getElementById('output');
@@ -34,9 +36,8 @@ const scenario = async () => {
3436
await api.move('Rect1', 5, 5);
3537
await api.rotate('Rect1', 5);
3638
const data = await api.read('Rect1');
37-
console.dir({ data })
39+
console.dir({ data });
3840
await show();
3941
};
4042

41-
const api = buildAPI(['rect', 'move', 'rotate', 'read', 'render', 'resize']);
4243
scenario();

0 commit comments

Comments
 (0)