Skip to content

Commit 66cadd4

Browse files
committed
Add 0-console.js file
1 parent b0b3d81 commit 66cadd4

File tree

4 files changed

+27
-15
lines changed

4 files changed

+27
-15
lines changed

0x05-Node_JS_basic/.babelrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

0x05-Node_JS_basic/.eslintrc.js

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ module.exports = {
44
es6: true,
55
jest: true,
66
},
7-
extends: [
8-
'airbnb-base',
9-
'plugin:jest/all',
10-
],
7+
extends: ['airbnb-base', 'plugin:jest/all'],
118
globals: {
129
Atomics: 'readonly',
1310
SharedArrayBuffer: 'readonly',
@@ -22,16 +19,12 @@ module.exports = {
2219
'no-underscore-dangle': 'off',
2320
'no-console': 'off',
2421
'no-shadow': 'off',
25-
'no-restricted-syntax': [
26-
'error',
27-
'LabeledStatement',
28-
'WithStatement',
29-
],
22+
'no-restricted-syntax': ['error', 'LabeledStatement', 'WithStatement'],
3023
},
31-
overrides:[
24+
overrides: [
3225
{
3326
files: ['*.js'],
3427
excludedFiles: 'babel.config.js',
35-
}
36-
]
28+
},
29+
],
3730
};

0x05-Node_JS_basic/0-console.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/**
2+
* Prints in STDOUT the string argument.
3+
* @param {String} msg The message to display.
4+
*
5+
*/
6+
const displayMessage = (msg) => {
7+
console.log(msg);
8+
};
9+
10+
module.exports = displayMessage;

0x05-Node_JS_basic/babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = {
2+
presets: [
3+
[
4+
'@babel/preset-env',
5+
{
6+
targets: {
7+
node: 'current',
8+
},
9+
},
10+
],
11+
],
12+
};

0 commit comments

Comments
 (0)