Skip to content

Commit 566ee20

Browse files
committed
fix: linter
1 parent 479e6e9 commit 566ee20

File tree

4 files changed

+18
-12
lines changed

4 files changed

+18
-12
lines changed

.github/actions/spelling/allow.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ npx
1818
personaname
1919
pgn
2020
playerstats
21+
rbga
2122
rtime
2223
scm
2324
shas
@@ -30,9 +31,14 @@ steamcommunity
3031
steamid
3132
steamids
3233
steampowered
34+
tdatum
3335
timecreated
36+
tspan
3437
ubuntu
3538
unlocktime
3639
userid
40+
xticked
41+
xticks
3742
yargsparser
43+
yticked
3844
webtoken

source/app/metrics/utils.mjs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ export class D3node {
809809
}
810810
}
811811

812-
/** Graph utilities */
812+
/**Graph utilities */
813813
export const Graph = {
814814
/**Timeline graph */
815815
timeline() {
@@ -825,7 +825,7 @@ export const Graph = {
825825
const margin = {top:10, left:10, right:10, bottom:45}
826826
const d3n = new D3node()
827827
const svg = d3n.createSVG(width, height)
828-
828+
829829
//Data
830830
const X = data.map(({x}) => x)
831831
const start = X.at(0)
@@ -855,7 +855,7 @@ export const Graph = {
855855
.style("text-anchor", "end")
856856
.style("font-size", 20)
857857
.attr("fill", "rgba(127, 127, 127, .8)")
858-
858+
859859
//Data range
860860
const y = d3.scaleLinear()
861861
.domain([high, low])
@@ -869,7 +869,7 @@ export const Graph = {
869869
.selectAll("text")
870870
.style("font-size", 20)
871871
.attr("fill", "rgba(127, 127, 127, .8)")
872-
872+
873873
//Generate graph line
874874
const datum = Y.map((y, i) => [X.at(i), y])
875875
const tdatum = Y.map((y, i) => [X.at(i), y, T[i]])
@@ -888,7 +888,7 @@ export const Graph = {
888888
.attr("fill", "transparent")
889889
.attr("stroke", "#87ceeb")
890890
.attr("stroke-width", 2)
891-
891+
892892
//Generate graph area
893893
if (area) {
894894
svg.append("path")
@@ -904,7 +904,7 @@ export const Graph = {
904904
)
905905
.attr("fill", "rgba(88, 166, 255, .1)")
906906
}
907-
907+
908908
//Generate graph points
909909
if (points) {
910910
svg.append("g")
@@ -917,7 +917,7 @@ export const Graph = {
917917
.attr("r", 2)
918918
.attr("fill", "#106cbc")
919919
}
920-
920+
921921
//Generate graph text
922922
if (text) {
923923
svg.append("g")
@@ -938,7 +938,7 @@ export const Graph = {
938938
.text(d => d[2] ? d[2] : "")
939939
.attr("fill", "rgba(127, 127, 127, .8)")
940940
}
941-
941+
942942
return d3n.svgString()
943943
},
944944
/**Pie Graph */
@@ -947,7 +947,7 @@ export const Graph = {
947947
const radius = Math.min(width, height) / 2
948948
const d3n = new D3node()
949949
const svg = d3n.createSVG(width, height)
950-
950+
951951
//Data
952952
const K = Object.keys(data)
953953
const V = Object.values(data)
@@ -958,7 +958,7 @@ export const Graph = {
958958
const arcs = d3.pie().padAngle(1/radius).sort(null).value(i => V[i])(I)
959959
const arc = d3.arc().innerRadius(0).outerRadius(radius)
960960
const labels = d3.arc().innerRadius(radius/2).outerRadius(radius/2)
961-
961+
962962
svg.append("g")
963963
.attr("transform", `translate(${width/2},${height/2})`)
964964
.attr("stroke", "white")

source/plugins/habits/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default async function({login, data, rest, imports, q, account}, {enabled
126126
].map(({type, data, high, low, ticks, colors = null, labels = null, half = false}) => {
127127
const width = 480 * (half ? 0.45 : 1)
128128
const height = 160
129-
if (type === "line")
129+
if (type === "line")
130130
return imports.Graph.line(Object.entries(data).map(([x, y]) => ({x:+x, y})), {low, high, ticks, labels, width, height})
131131
console.log(data)
132132
if (type === "pie")

source/plugins/stargazers/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default async function({login, graphql, data, imports, q, queries, accoun
6767
let charts = _charts ? true : null
6868
if ((["graph", "chartist"].includes(_charts_type)) && (imports.metadata.plugins.stargazers.extras("charts.type", {extras}))) {
6969
console.debug(`metrics/compute/${login}/plugins > stargazers > generating charts`)
70-
charts = await Promise.all([{data: total, low: total.min, high: total.max}, {data: increments, low: 0, high: increments.max, sign: true}].map(({data: {dates: set}, low, high, sign = false}) =>
70+
charts = await Promise.all([{data: total, low: total.min, high: total.max}, {data: increments, low: 0, high: increments.max, sign: true}].map(({data: {dates: set}, low, high, sign = false}) =>
7171
imports.Graph.timeline(Object.entries(set).map(([x, y]) => ({x:new Date(x), y, text:imports.format(y, {sign})})), {low, high,
7272
match:(data, ticks) => data.filter(([x]) => ticks.map(t => t.toISOString().slice(0, 10)).includes(x.toISOString().slice(0, 10))),
7373
})

0 commit comments

Comments
 (0)