Skip to content

Commit e5101ef

Browse files
committed
Apply code style
1 parent c9addaa commit e5101ef

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package.json
2+
package-lock.json
3+
JavaScript/badServer.js

JavaScript/goodServer.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ const types = {
2020
function: (fn, req, res) => fn(req, res).toString(),
2121
};
2222

23-
http.createServer((req, res) => {
24-
const data = routing[req.url];
25-
const type = typeof data;
26-
const serializer = types[type];
27-
const result = serializer(data, req, res);
28-
res.end(result);
29-
}).listen(PORT);
23+
http
24+
.createServer((req, res) => {
25+
const data = routing[req.url];
26+
const type = typeof data;
27+
const serializer = types[type];
28+
const result = serializer(data, req, res);
29+
res.end(result);
30+
})
31+
.listen(PORT);

eslint.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
const init = require('eslint-config-metarhia');
44

5-
init[0].rules['no-lonely-if'] = 'off';
6-
7-
module.exports = init;
5+
module.exports = [
6+
...init,
7+
{
8+
ignores: ['**/badServer.js'],
9+
},
10+
];

0 commit comments

Comments
 (0)