Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f402d20

Browse filesBrowse files
committed
Prettier: enable trailing comma (es5 option)
1 parent 92d734b commit f402d20
Copy full SHA for f402d20

File tree

Expand file treeCollapse file tree

8 files changed

+22
-20
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

8 files changed

+22
-20
lines changed
Open diff view settings
Collapse file

‎Week1/homework/app.js‎

Copy file name to clipboardExpand all lines: Week1/homework/app.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
const bookTitles = [
55
// Replace with your own book titles
6-
'harry_potter_chamber_secrets'
6+
'harry_potter_chamber_secrets',
77
];
88

99
// Replace with your own code
Collapse file

‎Week2/homework/maartjes-work.js‎

Copy file name to clipboardExpand all lines: Week2/homework/maartjes-work.js
+12-12Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,43 @@
33
const monday = [
44
{
55
name: 'Write a summary HTML/CSS',
6-
duration: 180
6+
duration: 180,
77
},
88
{
99
name: 'Some web development',
10-
duration: 120
10+
duration: 120,
1111
},
1212
{
1313
name: 'Fix homework for class10',
14-
duration: 20
14+
duration: 20,
1515
},
1616
{
1717
name: 'Talk to a lot of people',
18-
duration: 200
19-
}
18+
duration: 200,
19+
},
2020
];
2121

2222
const tuesday = [
2323
{
2424
name: 'Keep writing summary',
25-
duration: 240
25+
duration: 240,
2626
},
2727
{
2828
name: 'Some more web development',
29-
duration: 180
29+
duration: 180,
3030
},
3131
{
3232
name: 'Staring out the window',
33-
duration: 10
33+
duration: 10,
3434
},
3535
{
3636
name: 'Talk to a lot of people',
37-
duration: 200
37+
duration: 200,
3838
},
3939
{
4040
name: 'Look at application assignments new students',
41-
duration: 40
42-
}
41+
duration: 40,
42+
},
4343
];
4444

4545
const maartjesTasks = monday.concat(tuesday);
@@ -61,5 +61,5 @@ console.log(`Maartje has earned €${'replace this string with the earnings roun
6161
module.exports = {
6262
maartjesTasks,
6363
maartjesHourlyRate,
64-
computeEarnings
64+
computeEarnings,
6565
};
Collapse file

‎Week2/homework/map-filter.js‎

Copy file name to clipboardExpand all lines: Week2/homework/map-filter.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ console.log(doubleOddNumbers(myNumbers));
1111
// Do not change or remove anything below this line
1212
module.exports = {
1313
myNumbers,
14-
doubleOddNumbers
14+
doubleOddNumbers,
1515
};
Collapse file

‎Week3/homework/step2-3.js‎

Copy file name to clipboardExpand all lines: Week3/homework/step2-3.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ console.log('do-while', repeatStringNumTimesWithDoWhile('abc', 3));
4343
module.exports = {
4444
repeatStringNumTimesWithFor,
4545
repeatStringNumTimesWithWhile,
46-
repeatStringNumTimesWithDoWhile
46+
repeatStringNumTimesWithDoWhile,
4747
};
Collapse file

‎Week3/homework/step2-6.js‎

Copy file name to clipboardExpand all lines: Week3/homework/step2-6.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ console.log(flattenArray3d(arr3d)); // -> [1, 2, 3, 4, 5, 6, 7, 8]
1919
// Do not change or remove anything below this line
2020
module.exports = {
2121
flattenArray2d,
22-
flattenArray3d
22+
flattenArray3d,
2323
};
Collapse file

‎Week3/test/console-test.js‎

Copy file name to clipboardExpand all lines: Week3/test/console-test.js
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
function consoleTest(filename, expectedOutput) {
44
let outputData = '';
5+
// eslint-disable-next-line no-return-assign
56
const storeLog = (...inputs) => (outputData += inputs.join(' '));
67

78
test(filename, () => {
8-
console['log'] = jest.fn(storeLog);
9+
console.log = jest.fn(storeLog);
10+
// eslint-disable-next-line global-require
911
require('../homework/' + filename);
1012
expect(outputData).toBe(expectedOutput);
1113
});
Collapse file

‎Week3/test/step2-3.test.js‎

Copy file name to clipboardExpand all lines: Week3/test/step2-3.test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const {
22
repeatStringNumTimesWithFor,
33
repeatStringNumTimesWithWhile,
4-
repeatStringNumTimesWithDoWhile
4+
repeatStringNumTimesWithDoWhile,
55
} = require('../homework/step2-3');
66

77
describe('step2-3 with for-loop', () => {
Collapse file

‎prettier.config.js‎

Copy file name to clipboard
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module.exports = {
22
printWidth: 100,
33
singleQuote: true,
4-
trailingComma: 'none',
4+
trailingComma: 'es5',
55
bracketSpacing: true,
66
jsxBracketSameLine: false,
77
tabWidth: 2,
8-
semi: true
8+
semi: true,
99
};

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.