1
0
Fork 0

chore: Linter issues

This commit is contained in:
joostdecock 2023-09-07 20:15:40 +02:00
parent 46771ffca7
commit a253920dd5
10 changed files with 11 additions and 22 deletions

View file

@ -22,7 +22,7 @@ const rmbanner = function (id = macroDefaults.id, { paths, store, part }) {
delete paths[pid]
}
const banner = function (config, { part, paths, store, log, complete }) {
const banner = function (config, { part, paths, store, complete }) {
/*
* Don't add a banne when complete is false, unless force is true
*/

View file

@ -29,10 +29,7 @@ const rmcrossbox = function (id = macroDefaults.id, { paths, points, store, part
/*
* The crossbox macro
*/
const crossbox = function (
config,
{ points, Point, paths, Path, getId, complete, store, log, part }
) {
const crossbox = function (config, { points, Point, paths, Path, complete, store, log, part }) {
/*
* Don't add a title when complete is false, unless force is true
*/

View file

@ -46,10 +46,7 @@ const rmcutonfold = function (id = macroDefaults.id, { paths, store, part }) {
/*
* The cutonfold macro
*/
const cutonfold = function (
config,
{ points, paths, Path, complete, store, scale, log, Point, part }
) {
const cutonfold = function (config, { paths, Path, complete, store, scale, log, Point, part }) {
/*
* Don't add a cutonfold indicator when complete is false, unless force is true
*/

View file

@ -128,7 +128,7 @@ const addDimension = (config, props, type) => {
* Draw the dimension
*/
if (type === 'pd') {
if (typeof mc.d === 'undefined') mc.d = 10 * scale
if (typeof mc.d === 'undefined') mc.d = 10 * props.scale
props.paths[ids.line] = mc.path
.offset(mc.d)
.attr('class', mc.classes.line)

View file

@ -51,9 +51,9 @@ function flag(type, store, data) {
* @param {id} string - The flag id to remove
*/
function unflag(type, store, id) {
if (type === 'preset' && presets[preset]) {
id = presets[preset].id || presets[preset].msg
type = presets[preset].type
if (type === 'preset' && presets[id]) {
type = presets[id].type
id = presets[id].id || presets[id].msg
}
store.unset([...storeRoot, type, id])
}

View file

@ -44,7 +44,7 @@ const rmgrainline = function (id = macroDefaults.id, { paths, store, part }) {
/*
* The grainline macro
*/
const grainline = function (config = {}, { points, paths, Path, complete, store, part }) {
const grainline = function (config = {}, { paths, Path, Point, complete, store, log, part }) {
/*
* Don't add a cutonfold indicator when complete is false, unless force is true
*/

View file

@ -39,7 +39,7 @@ const rmpleat = function (id = macroDefaults.id, { paths, store, part }) {
/*
* The pleat macro
*/
const pleat = function (config, { points, paths, Path, complete, scale, store, part }) {
const pleat = function (config, { paths, Path, log, Point, complete, scale, store, part }) {
/*
* Don't add a pleat when complete is false, unless force is true
*/

View file

@ -52,7 +52,7 @@ const rmsewtogether = function (id = macroDefaults.id, { paths, store, part }) {
/*
* The sewtogether macro
*/
const sewtogether = function (config, { points, paths, Path, complete, sa, store, part }) {
const sewtogether = function (config, { paths, Path, log, Point, complete, sa, store, part }) {
/*
* Don't add a title when complete is false, unless force is true
*/

View file

@ -7,7 +7,6 @@ import { useTranslation } from 'next-i18next'
import { useState } from 'react'
// Components
import {
CloseIcon,
ChatIcon,
TipIcon,
WarningIcon,

View file

@ -1,12 +1,10 @@
// Dependencies
import { Fragment, useContext } from 'react'
import { Fragment } from 'react'
import { nsMerge } from 'shared/utils.mjs'
import { ns as authNs } from 'shared/components/wrappers/auth/index.mjs'
import { designMeasurements, horFlexClasses } from 'shared/utils.mjs'
// Hooks
import { useTranslation } from 'next-i18next'
// Context
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
// Components
import {
UserSetPicker,
@ -25,7 +23,6 @@ const iconClasses = { className: 'w-8 h-8 md:w-10 md:h-10 lg:w-12 lg:h-12 shrink
export const MeasiesView = ({ design, Design, settings, update, missingMeasurements, setView }) => {
const { t } = useTranslation(['workbench'])
const { setLoadingStatus } = useContext(LoadingStatusContext)
const loadMeasurements = (set) => {
update.settings([
@ -33,7 +30,6 @@ export const MeasiesView = ({ design, Design, settings, update, missingMeasureme
[['units'], set.imperial ? 'imperial' : 'metric'],
])
setView('draft')
//setLoadingStatus([true, 'workbench:appliedMeasies', true, true])
}
return (