1
0
Fork 0

chore(plugin-annotations): Linter warnings

This commit is contained in:
joostdecock 2023-04-15 15:58:06 +02:00
parent 3eb0f11abb
commit 9869bb245d
5 changed files with 8 additions and 10 deletions

View file

@ -1,6 +1,6 @@
// Export macros
export const bannerboxMacros = {
bannerbox: function (so, { points, Point, paths, Path, getId, macro }) {
bannerbox: function (so, { Point, paths, Path, getId, macro }) {
// Spread so settings into defaults
so = {
topLeft: new Point(0, 0),

View file

@ -5,9 +5,7 @@ const logo = (scale) =>
export const logoHooks = {
preRender: [
function (svg) {
for (const def of svg.defs) {
if (svg.defs.indexOf('id="logo"') === -1) svg.defs += logo(svg.pattern.settings[0].scale)
}
},
],
}

View file

@ -185,7 +185,7 @@ export const scaleboxMacros = {
.attr('data-text', `${imperialDisplayHeight}`)
.attr('data-text-class', 'text-xs center ')
},
miniscale(so, { store, points, paths, scale, Point, Path }) {
miniscale(so, { points, paths, scale, Point, Path }) {
// Passing `false` will remove the miniscale
if (so === false) {
for (const id of [

View file

@ -21,7 +21,7 @@ export const sewtogetherHooks = {
// Export macros
export const sewtogetherMacros = {
sewTogether: function (so, { points, paths, Path, complete, scale, sa }) {
sewTogether: function (so, { points, paths, Path, complete, sa }) {
if (so === false) {
delete points.sewtogetherFrom
delete points.sewtogetherFromCp

View file

@ -11,7 +11,7 @@ describe('Sewtogether Plugin Tests', () => {
draft: ({ Point, points, macro, part }) => {
points.from = new Point(10, 20)
points.to = new Point(10, 220)
macro('sewtogether', {
macro('sewTogether', {
from: points.from,
to: points.to,
})
@ -48,7 +48,7 @@ describe('Sewtogether Plugin Tests', () => {
points.from = new Point(10, 20)
points.hinge = new Point(40, 110)
points.to = new Point(10, 220)
macro('sewtogether', {
macro('sewTogether', {
from: points.from,
hinge: points.hinge,
to: points.to,
@ -72,14 +72,14 @@ describe('Sewtogether Plugin Tests', () => {
expect(round(c.ops[1].to.y)).to.equal(120)
})
it('Should run the sewtogether/hinge (with sa) macro', () => {
it('Should run the sewTogether/hinge (with sa) macro', () => {
const part = {
name: 'test',
draft: ({ Point, points, macro, part }) => {
points.from = new Point(10, 20)
points.hinge = new Point(40, 110)
points.to = new Point(10, 220)
macro('sewtogether', {
macro('sewTogether', {
from: points.from,
hinge: points.hinge,
to: points.to,