1
0
Fork 0

chore: Linter

This commit is contained in:
Joost De Cock 2021-01-31 09:22:15 +01:00
parent adb9e93024
commit 1a46c8e724
227 changed files with 660 additions and 936 deletions

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, paths, Path } = part.shorthand()
points.origin = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, options } = part.shorthand()
/**

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.from = new Point(5, 20)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.B = new Point(10, 50)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.example = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.example = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
paths.clone = paths.example
.clone()

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.from = new Point(10, 20)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.from = new Point(10, 20)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.from = new Point(10, 20)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.A = new Point(55, 40)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.demo = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.demo = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
snippets.end = new Snippet('notch', paths.demo.end())

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(95, 50)
@ -12,10 +12,7 @@ export default part => {
points.top = new Point(60, -10)
points.bot = new Point(60, 140)
paths.line = new Path()
.move(points.top)
.line(points.bot)
.attr('class', 'lining dashed')
paths.line = new Path().move(points.top).line(points.bot).attr('class', 'lining dashed')
paths.demo = new Path()
.move(points.A)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(55, 40)
@ -12,10 +12,7 @@ export default part => {
points.top = new Point(10, 58)
points.bot = new Point(130, 58)
paths.line = new Path()
.move(points.top)
.line(points.bot)
.attr('class', 'lining dashed')
paths.line = new Path().move(points.top).line(points.bot).attr('class', 'lining dashed')
paths.demo = new Path()
.move(points.A)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.path1 = new Path()
.move(points.A)
.line(points.B)
.attr('class', 'various')
paths.path1 = new Path().move(points.A).line(points.B).attr('class', 'various')
paths.path2 = new Path()
.move(points.B)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.example = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.example = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
macro('pd', {
path: paths.example,

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.from = new Point(10, 10)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.to = new Point(50, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.A = new Point(45, 60)
@ -16,11 +16,7 @@ export default part => {
paths.offset = paths.example.offset(-10).attr('class', 'interfacing')
paths.lineOffset = new Path()
.move(points.A)
.line(points.B)
.offset(-5)
.attr('class', 'various')
paths.lineOffset = new Path().move(points.A).line(points.B).offset(-5).attr('class', 'various')
paths.curveOffset = new Path()
.move(points.B)

View file

@ -1,7 +1,7 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, options } = part.shorthand()
const textClasses = label =>
const textClasses = (label) =>
options.focus === label ? 'center text-xs fill-note' : 'center text-xs'
points.A = new Point(10, 10)
@ -46,11 +46,7 @@ export default part => {
.attr('data-text', 'Path.close()')
.attr('data-text-class', textClasses('close'))
paths.example = paths.line
.join(paths.curve)
.join(paths._curve)
.join(paths.curve_)
.close()
paths.example = paths.line.join(paths.curve).join(paths._curve).join(paths.curve_).close()
return part
}

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.B = new Point(10, 30)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.example = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.example = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
points.x1 = paths.example
.shiftAlong(20)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.example = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.example = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
points.x1 = paths.example
.shiftFractionAlong(0.2)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.example = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.example = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
snippets.start = new Snippet('notch', paths.example.start())
return part

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.A = new Point(45, 60)
@ -7,10 +7,7 @@ export default part => {
points.C = new Point(90, 30)
points.CCp1 = new Point(50, -30)
paths.A = new Path()
.move(points.A)
.line(points.B)
.curve(points.BCp2, points.CCp1, points.C)
paths.A = new Path().move(points.A).line(points.B).curve(points.BCp2, points.CCp1, points.C)
paths.B = paths.A.translate(60, 30)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.center = new Point(0, 0)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.A = new Point(0, 0)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, snippets, Snippet } = part.shorthand()
snippets.logo = new Snippet('logo', new Point(50, 30))

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.topLeft = new Point(0, 0)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.anchor1 = new Point(0, 0)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.a = new Point(10, 10)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.title = new Point(90, 45)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.sun = new Point(10, 5)
@ -8,10 +8,7 @@ export default part => {
.attr('data-text', points.sun.angle(points.moon) + '°')
.attr('data-text-class', 'text-sm fill-note center')
paths.line = new Path()
.move(points.sun)
.line(points.moon)
.attr('class', 'dashed')
paths.line = new Path().move(points.sun).line(points.moon).attr('class', 'dashed')
return part
}

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points } = part.shorthand()
points.anchor = new Point(100, 25)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.A = new Point(25, 25)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.A = new Point(50, 25).attr('data-text', 'Point A').attr('data-text-class', 'text-xl')

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.from = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.from = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.from = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.top = new Point(50, 10)
@ -39,10 +39,7 @@ export default part => {
.line(points._out1)
.close()
paths.mirror = new Path()
.move(points.top)
.line(points.bottom)
.attr('class', 'note dashed')
paths.mirror = new Path().move(points.top).line(points.bottom).attr('class', 'note dashed')
return part
}

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.start = new Point(0, 50)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.sun = new Point(40, 40)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.A = new Point(90, 40).attr('data-text', 'Point A').attr('data-text-class', 'right')

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.A = new Point(90, 70).attr('data-text', 'Point A')
@ -8,10 +8,7 @@ export default part => {
.attr('data-text-class', 'center')
.attr('data-text-lineheight', 6)
paths.direction = new Path()
.move(points.A)
.line(points.B)
.attr('class', 'note dashed')
paths.direction = new Path().move(points.A).line(points.B).attr('class', 'note dashed')
macro('ld', {
from: points.C,

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.A = new Point(90, 70).attr('data-text', 'Point A')
@ -9,10 +9,7 @@ export default part => {
.attr('data-text', 'Point C is point A shifted 3cm\nbeyond point B')
.attr('data-text-lineheight', 6)
paths.direction = new Path()
.move(points.A)
.line(points.C)
.attr('class', 'note dashed')
paths.direction = new Path().move(points.A).line(points.C).attr('class', 'note dashed')
macro('ld', {
from: points.C,

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths, macro } = part.shorthand()
points.A = new Point(90, 70).attr('data-text', 'Point A')
@ -10,10 +10,7 @@ export default part => {
.attr('data-text-class', 'center')
.attr('data-text-lineheight', 6)
paths.direction = new Path()
.move(points.A)
.line(points.B)
.attr('class', 'note dashed')
paths.direction = new Path().move(points.A).line(points.B).attr('class', 'note dashed')
macro('ld', {
from: points.C,

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
let s

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
box(part)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, macro } = part.shorthand()
points.A = new Point(20, 20).attr('data-text', 'Point A')

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths } = part.shorthand()
points.A = new Point(45, 60)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor1 = new Point(20, 15)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(50, 15)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets } = part.shorthand()
points.anchor = new Point(35, 35)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(95, 45).attr('data-circle', 35).attr('data-circle-class', 'fabric')

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10).attr('data-circle', 15).attr('data-circle-class', 'fabric')

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, utils, snippets, Snippet } = part.shorthand()
points.start = new Point(10, 15)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, utils, snippets, Snippet } = part.shorthand()
points.start = new Point(10, 45)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10)

View file

@ -1,6 +1,6 @@
import { box } from './shared'
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(95, 45).attr('data-circle', 35).attr('data-circle-class', 'fabric')

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.A = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.from1 = new Point(10, 10)
@ -24,22 +24,10 @@ export default part => {
} else snippet = 'bnotch'
snippets[part.getId()] = new Snippet(snippet, point)
}
paths.line1 = new Path()
.move(points.from1)
.line(points.to1)
.attr('class', 'fabric stroke-lg')
paths.lne1 = new Path()
.move(points.to1)
.line(points.b1)
.attr('class', 'fabric dashed')
paths.line2 = new Path()
.move(points.from2)
.line(points.to2)
.attr('class', 'fabric stroke-lg')
paths.lne2 = new Path()
.move(points.to2)
.line(points.b2)
.attr('class', 'fabric dashed')
paths.line1 = new Path().move(points.from1).line(points.to1).attr('class', 'fabric stroke-lg')
paths.lne1 = new Path().move(points.to1).line(points.b1).attr('class', 'fabric dashed')
paths.line2 = new Path().move(points.from2).line(points.to2).attr('class', 'fabric stroke-lg')
paths.lne2 = new Path().move(points.to2).line(points.b2).attr('class', 'fabric dashed')
return part
}

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.start = new Point(10, 10)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, Snippet, snippets, utils } = part.shorthand()
points.from1 = new Point(10, 10)
@ -24,22 +24,10 @@ export default part => {
} else snippet = 'bnotch'
snippets[part.getId()] = new Snippet(snippet, point)
}
paths.line1 = new Path()
.move(points.from1)
.line(points.to1)
.attr('class', 'fabric stroke-lg')
paths.lne1 = new Path()
.move(points.to1)
.line(points.b1)
.attr('class', 'fabric dashed')
paths.line2 = new Path()
.move(points.from2)
.line(points.to2)
.attr('class', 'fabric stroke-lg')
paths.lne2 = new Path()
.move(points.to2)
.line(points.b2)
.attr('class', 'fabric dashed')
paths.line1 = new Path().move(points.from1).line(points.to1).attr('class', 'fabric stroke-lg')
paths.lne1 = new Path().move(points.to1).line(points.b1).attr('class', 'fabric dashed')
paths.line2 = new Path().move(points.from2).line(points.to2).attr('class', 'fabric stroke-lg')
paths.lne2 = new Path().move(points.to2).line(points.b2).attr('class', 'fabric dashed')
return part
}

View file

@ -1,12 +1,9 @@
export default part => {
export default (part) => {
let { Point, points, Path, paths, utils } = part.shorthand()
points.from = new Point(40, 10)
points.to = new Point(40, 80)
paths.line = new Path()
.move(points.from)
.line(points.to)
.attr('class', 'lining dashed')
paths.line = new Path().move(points.from).line(points.to).attr('class', 'lining dashed')
points.start = new Point(10, 15)
points.cp1 = new Point(80, 10)