Skip to content

Commit a73506b

Browse files
committed
styles: format syntax
1 parent 93eaefd commit a73506b

File tree

6 files changed

+283
-286
lines changed

6 files changed

+283
-286
lines changed

build/change-version.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ const DRY_RUN = process.argv.includes('--dry') || process.argv.includes('--dry-r
1818

1919
// These are the filetypes we only care about replacing the version
2020
const GLOB = [
21-
'**/*.{css,html,js,json,md,pug,scss,txt,yml}'
21+
'**/*.{css,html,js,json,md,pug,scss,txt,yml}',
2222
]
2323
const GLOBBY_OPTIONS = {
2424
cwd: path.join(__dirname, '..'),
25-
gitignore: true
25+
gitignore: true,
2626
}
2727
const EXCLUDED_FILES = [
28-
'CHANGELOG.md'
28+
'CHANGELOG.md',
2929
]
3030

3131
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
@@ -40,7 +40,7 @@ function regExpQuoteReplacement(string) {
4040
async function replaceRecursively(file, oldVersion, newVersion) {
4141
const originalString = await fs.readFile(file, 'utf8')
4242
const newString = originalString.replace(
43-
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
43+
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion),
4444
)
4545

4646
// No need to move any further if the strings are identical

build/postcss.config.js

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
'use strict'
22

3-
module.exports = ctx => {
4-
return {
5-
map: ctx.file.dirname.includes('examples') ?
6-
false :
7-
{
8-
inline: false,
9-
annotation: true,
10-
sourcesContent: true
11-
},
12-
plugins: {
13-
autoprefixer: {
14-
cascade: false
15-
},
16-
'postcss-combine-duplicated-selectors': {}
17-
}
18-
}
19-
}
3+
module.exports = ctx => ({
4+
map: ctx.file.dirname.includes('examples')
5+
? false
6+
: {
7+
inline: false,
8+
annotation: true,
9+
sourcesContent: true,
10+
},
11+
plugins: {
12+
autoprefixer: {
13+
cascade: false,
14+
},
15+
'postcss-combine-duplicated-selectors': {},
16+
},
17+
})

build/pug.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const globby = require('globby')
1111

1212
// These are the filetypes we only care about replacing the version
1313
const GLOB = [
14-
'**/*.pug'
14+
'**/*.pug',
1515
]
1616

1717
const SRC = 'src/pug/views/'
1818

1919
const GLOBBY_OPTIONS = {
20-
cwd: path.join(__dirname, '..', SRC)
20+
cwd: path.join(__dirname, '..', SRC),
2121
}
2222

2323
const compile = (filename, basedir) => {
@@ -34,10 +34,10 @@ const compile = (filename, basedir) => {
3434

3535
const fn = pug.compileFile(filename, {
3636
basedir: './pug/',
37-
pretty: true
37+
pretty: true,
3838
})
3939
const html = fn({
40-
base: base(levels)
40+
base: base(levels),
4141
})
4242
return html
4343
}

src/js/charts.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ const lineChart = new Chart(document.getElementById('canvas-1'), {
2222
borderColor: 'rgba(220, 220, 220, 1)',
2323
pointBackgroundColor: 'rgba(220, 220, 220, 1)',
2424
pointBorderColor: '#fff',
25-
data: [random(), random(), random(), random(), random(), random(), random()]
25+
data: [random(), random(), random(), random(), random(), random(), random()],
2626
},
2727
{
2828
label: 'My Second dataset',
2929
backgroundColor: 'rgba(151, 187, 205, 0.2)',
3030
borderColor: 'rgba(151, 187, 205, 1)',
3131
pointBackgroundColor: 'rgba(151, 187, 205, 1)',
3232
pointBorderColor: '#fff',
33-
data: [random(), random(), random(), random(), random(), random(), random()]
34-
}
35-
]
33+
data: [random(), random(), random(), random(), random(), random(), random()],
34+
},
35+
],
3636
},
3737
options: {
38-
responsive: true
39-
}
38+
responsive: true,
39+
},
4040
})
4141

4242
// eslint-disable-next-line no-unused-vars
@@ -50,20 +50,20 @@ const barChart = new Chart(document.getElementById('canvas-2'), {
5050
borderColor: 'rgba(220, 220, 220, 0.8)',
5151
highlightFill: 'rgba(220, 220, 220, 0.75)',
5252
highlightStroke: 'rgba(220, 220, 220, 1)',
53-
data: [random(), random(), random(), random(), random(), random(), random()]
53+
data: [random(), random(), random(), random(), random(), random(), random()],
5454
},
5555
{
5656
backgroundColor: 'rgba(151, 187, 205, 0.5)',
5757
borderColor: 'rgba(151, 187, 205, 0.8)',
5858
highlightFill: 'rgba(151, 187, 205, 0.75)',
5959
highlightStroke: 'rgba(151, 187, 205, 1)',
60-
data: [random(), random(), random(), random(), random(), random(), random()]
61-
}
62-
]
60+
data: [random(), random(), random(), random(), random(), random(), random()],
61+
},
62+
],
6363
},
6464
options: {
65-
responsive: true
66-
}
65+
responsive: true,
66+
},
6767
})
6868

6969
// eslint-disable-next-line no-unused-vars
@@ -74,12 +74,12 @@ const doughnutChart = new Chart(document.getElementById('canvas-3'), {
7474
datasets: [{
7575
data: [300, 50, 100],
7676
backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
77-
hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
78-
}]
77+
hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
78+
}],
7979
},
8080
options: {
81-
responsive: true
82-
}
81+
responsive: true,
82+
},
8383
})
8484

8585
// eslint-disable-next-line no-unused-vars
@@ -96,7 +96,7 @@ const radarChart = new Chart(document.getElementById('canvas-4'), {
9696
pointBorderColor: '#fff',
9797
pointHighlightFill: '#fff',
9898
pointHighlightStroke: 'rgba(220, 220, 220, 1)',
99-
data: [65, 59, 90, 81, 56, 55, 40]
99+
data: [65, 59, 90, 81, 56, 55, 40],
100100
},
101101
{
102102
label: 'My Second dataset',
@@ -106,13 +106,13 @@ const radarChart = new Chart(document.getElementById('canvas-4'), {
106106
pointBorderColor: '#fff',
107107
pointHighlightFill: '#fff',
108108
pointHighlightStroke: 'rgba(151, 187, 205, 1)',
109-
data: [28, 48, 40, 19, 96, 27, 100]
110-
}
111-
]
109+
data: [28, 48, 40, 19, 96, 27, 100],
110+
},
111+
],
112112
},
113113
options: {
114-
responsive: true
115-
}
114+
responsive: true,
115+
},
116116
})
117117

118118
// eslint-disable-next-line no-unused-vars
@@ -123,12 +123,12 @@ const pieChart = new Chart(document.getElementById('canvas-5'), {
123123
datasets: [{
124124
data: [300, 50, 100],
125125
backgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
126-
hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
127-
}]
126+
hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56'],
127+
}],
128128
},
129129
options: {
130-
responsive: true
131-
}
130+
responsive: true,
131+
},
132132
})
133133

134134
// eslint-disable-next-line no-unused-vars
@@ -138,10 +138,10 @@ const polarAreaChart = new Chart(document.getElementById('canvas-6'), {
138138
labels: ['Red', 'Green', 'Yellow', 'Grey', 'Blue'],
139139
datasets: [{
140140
data: [11, 16, 7, 3, 14],
141-
backgroundColor: ['#FF6384', '#4BC0C0', '#FFCE56', '#E7E9ED', '#36A2EB']
142-
}]
141+
backgroundColor: ['#FF6384', '#4BC0C0', '#FFCE56', '#E7E9ED', '#36A2EB'],
142+
}],
143143
},
144144
options: {
145-
responsive: true
146-
}
145+
responsive: true,
146+
},
147147
})

0 commit comments

Comments
 (0)