diff --git a/config/templates/tests/plugins/shared.test.mjs.template b/config/templates/tests/plugins/shared.test.mjs.template index 42cd98f4655..d6732ed0838 100644 --- a/config/templates/tests/plugins/shared.test.mjs.template +++ b/config/templates/tests/plugins/shared.test.mjs.template @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/aaron/src/back.js b/packages/aaron/src/back.js index 8108e4a5b5f..e487aff46b9 100644 --- a/packages/aaron/src/back.js +++ b/packages/aaron/src/back.js @@ -15,7 +15,6 @@ export default function (part) { utils, units, measurements, - scale, } = part.shorthand() // Lower back neck a bit diff --git a/packages/backend/package.json b/packages/backend/package.json index 8a10f846268..f75fdbb0d46 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -55,8 +55,6 @@ "@freesewing/i18n": "latest", "axios": "0.18.0", "body-parser": "1.18.3", - "buffer-to-stream": "^1.0.0", - "buffer-to-uint8array": "^1.1.0", "chai": "^4.3.4", "chai-http": "^4.3.0", "chalk": "2.4.1", diff --git a/packages/backend/src/controllers/og.js b/packages/backend/src/controllers/og.js index 3a0afdb2024..0d113d9d869 100644 --- a/packages/backend/src/controllers/og.js +++ b/packages/backend/src/controllers/og.js @@ -1,5 +1,5 @@ import config from "../config"; -import { capitalize, log } from "../utils"; +import { capitalize } from "../utils"; import sharp from 'sharp'; import fs from "fs"; import path from "path"; @@ -72,7 +72,7 @@ const loadMarkdownFile = async (page, site, lang) => fs.promises.readFile( 'utf-8' ).then(async (md) => md ? { - ...((await titleAndIntroFromLocalMarkdown(md, page))), + ...(await titleAndIntroFromLocalMarkdown(md, page)), sub: [ 'freesewing.dev/', page @@ -122,7 +122,6 @@ const introAsLines = intro => { // Get title and intro const getMetaData = { dev: async (page) => { - const data = {} const chunks = page.split('/') // Home page if (chunks.length === 1 && chunks[0] === '') return { diff --git a/packages/backend/src/controllers/strapi.js b/packages/backend/src/controllers/strapi.js index 22e5e3c0918..bd974999d9b 100644 --- a/packages/backend/src/controllers/strapi.js +++ b/packages/backend/src/controllers/strapi.js @@ -3,14 +3,6 @@ import config from '../config' import asBuffer from 'data-uri-to-buffer' import FormData from 'form-data' import fs from 'fs' -import toFile from 'data-uri-to-file' -import toStream from 'buffer-to-stream' -import tou8 from 'buffer-to-uint8array' - -const auth = { - identifier: config.strapi.username, - password: config.strapi.password, -} const getToken = async () => { let result @@ -66,7 +58,6 @@ const uploadPicture = async (img, name, token) => { // I hate you strapi, because this hack is the only way I can get your shitty upload to work const filename = `${config.strapi.tmp}/viaBackend.${extention}` - const onDisk = await fs.promises.writeFile(filename, asBuffer(img)) const file = fs.createReadStream(filename) form.append('files', file) form.append('fileInfo', JSON.stringify({ diff --git a/packages/backend/src/utils/email/index.js b/packages/backend/src/utils/email/index.js index 3b902b123f6..a1de50da5b8 100644 --- a/packages/backend/src/utils/email/index.js +++ b/packages/backend/src/utils/email/index.js @@ -22,7 +22,7 @@ const loadTemplate = (type, format, language='en') => { } const replace = (text, from, to) => { - for (let id in from) text = text.split(from[id]).join(to[id] || from[id]) + for (const id in from) text = text.split(from[id]).join(to[id] || from[id]) return text } diff --git a/packages/core/src/pattern.js b/packages/core/src/pattern.js index 6c5f7873d2e..a8a6f846bd1 100644 --- a/packages/core/src/pattern.js +++ b/packages/core/src/pattern.js @@ -61,7 +61,6 @@ export default function Pattern(config = { options: {} }) { scale: 1, layout: true, debug: true, - scale: 1, options: {}, absoluteOptions: {}, } diff --git a/packages/examples/src/plugin_banner.js b/packages/examples/src/plugin_banner.js index ede73576cdf..06ad2173f9c 100644 --- a/packages/examples/src/plugin_banner.js +++ b/packages/examples/src/plugin_banner.js @@ -1,5 +1,5 @@ const draftPluginBanner = (part) => { - const { points, Point, paths, Path, macro, options } = part.shorthand() + const { points, Point, paths, Path, macro } = part.shorthand() points.from = new Point(0, 0) points.to = new Point(320, 0) diff --git a/packages/freesewing.dev/components/header.js b/packages/freesewing.dev/components/header.js index 3d799e5fe76..54aa8dd9870 100644 --- a/packages/freesewing.dev/components/header.js +++ b/packages/freesewing.dev/components/header.js @@ -22,21 +22,20 @@ const Header = ({ app, setSearch }) => { const [prevScrollPos, setPrevScrollPos] = useState(0) const [show, setShow] = useState(true) - const handleScroll = () => { - const curScrollPos = (typeof window !== 'undefined') ? window.pageYOffset : 0 - if (curScrollPos >= prevScrollPos) { - if (show && curScrollPos > 20) setShow(false) - } - else setShow(true) - setPrevScrollPos(curScrollPos) - } - useEffect(() => { if (typeof window !== 'undefined') { + const handleScroll = () => { + const curScrollPos = (typeof window !== 'undefined') ? window.pageYOffset : 0 + if (curScrollPos >= prevScrollPos) { + if (show && curScrollPos > 20) setShow(false) + } + else setShow(true) + setPrevScrollPos(curScrollPos) + } window.addEventListener('scroll', handleScroll) return () => window.removeEventListener('scroll', handleScroll) } - }, [prevScrollPos, show, handleScroll]) + }, [prevScrollPos, show]) return ( diff --git a/packages/freesewing.dev/components/search.js b/packages/freesewing.dev/components/search.js index 37c3138db3f..32f063c31cf 100644 --- a/packages/freesewing.dev/components/search.js +++ b/packages/freesewing.dev/components/search.js @@ -1,4 +1,4 @@ -import { useState, useRef, useEffect } from 'react' +import { useState, useRef } from 'react' import Link from 'next/link' import { useRouter } from 'next/router' @@ -63,7 +63,7 @@ const Hit = props => ( - {props.hit?._highlightResult?.title + {props.hit._highlightResult?.title ? : props.hit.title } @@ -71,7 +71,7 @@ const Hit = props => ( {props.hit.page.split('/')[1]} - {props.hit?._snippetResult?.body && ( + {props.hit._snippetResult?.body && ( @@ -89,14 +89,13 @@ const Hit = props => ( ) // We use this for trapping ctrl-c -let prev const handleInputKeydown = (evt, setSearch, setActive, active, router) => { if (evt.key === 'Escape') setSearch(false) if (evt.key === 'ArrowDown') setActive(act => act + 1) if (evt.key === 'ArrowUp') setActive(act => act - 1) if (evt.key === 'Enter') { // Trigger navigation - if (evt?.target?.dataset?.links) { + if (evt.target?.dataset?.links) { router.push(JSON.parse(evt.target.dataset.links)[active]) setSearch(false) } @@ -112,7 +111,7 @@ const SearchBox = props => { }) if (input.current && props.active < 0) input.current.focus() - const { currentRefinement, isSearchStalled, refine, setSearch, setActive } = props + const { currentRefinement, refine, setSearch, setActive } = props return (
diff --git a/packages/freesewing.dev/hooks/useApp.js b/packages/freesewing.dev/hooks/useApp.js index c36aa30fcec..383bf8d3426 100644 --- a/packages/freesewing.dev/hooks/useApp.js +++ b/packages/freesewing.dev/hooks/useApp.js @@ -27,14 +27,11 @@ function useApp(full = true) { // State methods const togglePrimaryMenu = () => setPrimaryMenu(!primaryMenu) - const openPrimaryMenu = () => setPrimaryMenu(true) - const closePrimaryMenu = () => setPrimaryMenu(false) /* * Hot-update navigation method */ const updateNavigation = (path, content) => { - const newNavigation = {...navigation} if (typeof path === 'string') { path = (path.slice(0,1) === '/') ? path.slice(1).split('/') @@ -43,28 +40,6 @@ function useApp(full = true) { setNavigation(set(navigation, path, content)) } - /* - * Translation method - * - * Note that freesewing.dev is only available in English - * however we use certain shared code/components between - * freesewing.dev and freesewing.org, so we still need - * a translation method - */ - const t = (key=false, vals=false) => { - if (!key) return '' - if (!en.strings[key]) return key - let val = en.strings[key] - if (vals) { - for (const [search, replace] of Object.entries(vals)) { - val = val.replace(/search/g, replace) - } - } - - return val - } - - return { // Static vars site: 'dev', @@ -90,9 +65,7 @@ function useApp(full = true) { // State handlers togglePrimaryMenu, - } - } export default useApp diff --git a/packages/freesewing.dev/hooks/useMdx.js b/packages/freesewing.dev/hooks/useMdx.js deleted file mode 100644 index a10f3d8970b..00000000000 --- a/packages/freesewing.dev/hooks/useMdx.js +++ /dev/null @@ -1,10 +0,0 @@ -import path from 'path' - -const useMdx = (slug=false) => { - if (!slug) null - const file = ['markdown', 'dev', ...slug.split('/'), 'en.md'].join('/') - const mdx = require(file) - return

{file}

-} - -export default useMdx diff --git a/packages/freesewing.dev/pages/blog/[slug].js b/packages/freesewing.dev/pages/blog/[slug].js index 8b9dab90a2c..1613faf203f 100644 --- a/packages/freesewing.dev/pages/blog/[slug].js +++ b/packages/freesewing.dev/pages/blog/[slug].js @@ -74,7 +74,7 @@ const PostPage = ({ post, author }) => { href="#author" className="text-secondary hover:text-secondary-focus" > - {author?.displayname || 'FIXME: No displayname'} + {author.displayname || 'FIXME: No displayname'}
@@ -99,17 +99,6 @@ const PostPage = ({ post, author }) => { ) - - return ( - -
-
- -
-
- -
- ) } export const getStaticProps = async (props) => { diff --git a/packages/freesewing.dev/pages/index.js b/packages/freesewing.dev/pages/index.js index b55dd06ad40..d60ec3f1ff8 100644 --- a/packages/freesewing.dev/pages/index.js +++ b/packages/freesewing.dev/pages/index.js @@ -1,6 +1,5 @@ import Page from 'shared/components/wrappers/page.js' import useApp from 'site/hooks/useApp.js' -import Logo from 'shared/components/logos/freesewing.js' import Head from 'next/head' import HelpUs from 'site/components/help-us.js' import Link from 'next/link' diff --git a/packages/freesewing.org/components/header.js b/packages/freesewing.org/components/header.js index 3d799e5fe76..54aa8dd9870 100644 --- a/packages/freesewing.org/components/header.js +++ b/packages/freesewing.org/components/header.js @@ -22,21 +22,20 @@ const Header = ({ app, setSearch }) => { const [prevScrollPos, setPrevScrollPos] = useState(0) const [show, setShow] = useState(true) - const handleScroll = () => { - const curScrollPos = (typeof window !== 'undefined') ? window.pageYOffset : 0 - if (curScrollPos >= prevScrollPos) { - if (show && curScrollPos > 20) setShow(false) - } - else setShow(true) - setPrevScrollPos(curScrollPos) - } - useEffect(() => { if (typeof window !== 'undefined') { + const handleScroll = () => { + const curScrollPos = (typeof window !== 'undefined') ? window.pageYOffset : 0 + if (curScrollPos >= prevScrollPos) { + if (show && curScrollPos > 20) setShow(false) + } + else setShow(true) + setPrevScrollPos(curScrollPos) + } window.addEventListener('scroll', handleScroll) return () => window.removeEventListener('scroll', handleScroll) } - }, [prevScrollPos, show, handleScroll]) + }, [prevScrollPos, show]) return ( diff --git a/packages/freesewing.org/components/search.js b/packages/freesewing.org/components/search.js index 37c3138db3f..32f063c31cf 100644 --- a/packages/freesewing.org/components/search.js +++ b/packages/freesewing.org/components/search.js @@ -1,4 +1,4 @@ -import { useState, useRef, useEffect } from 'react' +import { useState, useRef } from 'react' import Link from 'next/link' import { useRouter } from 'next/router' @@ -63,7 +63,7 @@ const Hit = props => ( - {props.hit?._highlightResult?.title + {props.hit._highlightResult?.title ? : props.hit.title } @@ -71,7 +71,7 @@ const Hit = props => ( {props.hit.page.split('/')[1]} - {props.hit?._snippetResult?.body && ( + {props.hit._snippetResult?.body && ( @@ -89,14 +89,13 @@ const Hit = props => ( ) // We use this for trapping ctrl-c -let prev const handleInputKeydown = (evt, setSearch, setActive, active, router) => { if (evt.key === 'Escape') setSearch(false) if (evt.key === 'ArrowDown') setActive(act => act + 1) if (evt.key === 'ArrowUp') setActive(act => act - 1) if (evt.key === 'Enter') { // Trigger navigation - if (evt?.target?.dataset?.links) { + if (evt.target?.dataset?.links) { router.push(JSON.parse(evt.target.dataset.links)[active]) setSearch(false) } @@ -112,7 +111,7 @@ const SearchBox = props => { }) if (input.current && props.active < 0) input.current.focus() - const { currentRefinement, isSearchStalled, refine, setSearch, setActive } = props + const { currentRefinement, refine, setSearch, setActive } = props return (
diff --git a/packages/freesewing.org/hooks/useApp.js b/packages/freesewing.org/hooks/useApp.js index c36aa30fcec..383bf8d3426 100644 --- a/packages/freesewing.org/hooks/useApp.js +++ b/packages/freesewing.org/hooks/useApp.js @@ -27,14 +27,11 @@ function useApp(full = true) { // State methods const togglePrimaryMenu = () => setPrimaryMenu(!primaryMenu) - const openPrimaryMenu = () => setPrimaryMenu(true) - const closePrimaryMenu = () => setPrimaryMenu(false) /* * Hot-update navigation method */ const updateNavigation = (path, content) => { - const newNavigation = {...navigation} if (typeof path === 'string') { path = (path.slice(0,1) === '/') ? path.slice(1).split('/') @@ -43,28 +40,6 @@ function useApp(full = true) { setNavigation(set(navigation, path, content)) } - /* - * Translation method - * - * Note that freesewing.dev is only available in English - * however we use certain shared code/components between - * freesewing.dev and freesewing.org, so we still need - * a translation method - */ - const t = (key=false, vals=false) => { - if (!key) return '' - if (!en.strings[key]) return key - let val = en.strings[key] - if (vals) { - for (const [search, replace] of Object.entries(vals)) { - val = val.replace(/search/g, replace) - } - } - - return val - } - - return { // Static vars site: 'dev', @@ -90,9 +65,7 @@ function useApp(full = true) { // State handlers togglePrimaryMenu, - } - } export default useApp diff --git a/packages/freesewing.org/hooks/useMdx.js b/packages/freesewing.org/hooks/useMdx.js deleted file mode 100644 index a10f3d8970b..00000000000 --- a/packages/freesewing.org/hooks/useMdx.js +++ /dev/null @@ -1,10 +0,0 @@ -import path from 'path' - -const useMdx = (slug=false) => { - if (!slug) null - const file = ['markdown', 'dev', ...slug.split('/'), 'en.md'].join('/') - const mdx = require(file) - return

{file}

-} - -export default useMdx diff --git a/packages/freesewing.org/pages/[...mdxslug].js b/packages/freesewing.org/pages/[...mdxslug].js index 16806ff2a74..27f390155ba 100644 --- a/packages/freesewing.org/pages/[...mdxslug].js +++ b/packages/freesewing.org/pages/[...mdxslug].js @@ -33,7 +33,7 @@ const MdxPage = props => { - diff --git a/packages/freesewing.org/pages/blog/[slug].js b/packages/freesewing.org/pages/blog/[slug].js index 8b9dab90a2c..1613faf203f 100644 --- a/packages/freesewing.org/pages/blog/[slug].js +++ b/packages/freesewing.org/pages/blog/[slug].js @@ -74,7 +74,7 @@ const PostPage = ({ post, author }) => { href="#author" className="text-secondary hover:text-secondary-focus" > - {author?.displayname || 'FIXME: No displayname'} + {author.displayname || 'FIXME: No displayname'}
@@ -99,17 +99,6 @@ const PostPage = ({ post, author }) => { ) - - return ( - -
-
- -
-
- -
- ) } export const getStaticProps = async (props) => { diff --git a/packages/freesewing.org/pages/index.js b/packages/freesewing.org/pages/index.js index 37370a49159..580d4a75bde 100644 --- a/packages/freesewing.org/pages/index.js +++ b/packages/freesewing.org/pages/index.js @@ -1,9 +1,7 @@ import Page from 'shared/components/wrappers/page.js' import useApp from 'site/hooks/useApp.js' -import Logo from 'shared/components/logos/freesewing.js' import Head from 'next/head' import HelpUs from 'site/components/help-us.js' -import Link from 'next/link' const HomePage = (props) => { const app = useApp() diff --git a/packages/freesewing.shared/components/copy-to-clipboard.js b/packages/freesewing.shared/components/copy-to-clipboard.js index d9dbe79b3e4..864e0de1965 100644 --- a/packages/freesewing.shared/components/copy-to-clipboard.js +++ b/packages/freesewing.shared/components/copy-to-clipboard.js @@ -1,5 +1,5 @@ import ReactDOMServer from 'react-dom/server' -import { useState, useEffect } from 'react' +import { useState } from 'react' import CopyIcon from 'shared/components/icons/copy.js' import {CopyToClipboard} from 'react-copy-to-clipboard' diff --git a/packages/freesewing.shared/components/icons/heart.js b/packages/freesewing.shared/components/icons/heart.js index 5710604bb2a..3a33a2a5d07 100644 --- a/packages/freesewing.shared/components/icons/heart.js +++ b/packages/freesewing.shared/components/icons/heart.js @@ -5,4 +5,4 @@ const Heart = () => ( ) -export const Heart +export default Heart diff --git a/packages/freesewing.shared/components/layouts/default.js b/packages/freesewing.shared/components/layouts/default.js index 610058d1075..356f714aa15 100644 --- a/packages/freesewing.shared/components/layouts/default.js +++ b/packages/freesewing.shared/components/layouts/default.js @@ -1,3 +1,4 @@ +import React from 'react' import { useState } from 'react' import { useRouter } from 'next/router' import Link from 'next/link' @@ -10,8 +11,6 @@ import Header from 'site/components/header' import Footer from 'site/components/footer' import Search from 'site/components/search' -const iconSize= 48 - const PageTitle = ({ app, slug, title }) => { if (title) return

{title}

if (slug) return

{get(app.navigation, slug.split('/')).__title}

@@ -39,7 +38,7 @@ const Breadcrumbs = ({ app, slug=false, title }) => { {crumbs.map(crumb => ( - <> +
  • »
  • {crumb[2] @@ -53,7 +52,7 @@ const Breadcrumbs = ({ app, slug=false, title }) => { : {crumb[0]} }
  • - +
    ))} ) @@ -71,13 +70,11 @@ const DefaultLayout = ({ app, title=false, children=[], search, setSearch}) => { } const router = useRouter() - router?.events?.on('routeChangeStart', startNavigation) - router?.events?.on('routeChangeComplete', () => app.stopLoading()) + router.events?.on('routeChangeStart', startNavigation) + router.events?.on('routeChangeComplete', () => app.stopLoading()) const slug = router.asPath.slice(1) const [leftNav, setLeftNav] = useState(false) - const toggleLeftNav = () => setLeftNav(!leftNav) - return (
    {[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20].map( i => ( - <> + - + ))} ), @@ -43,10 +43,10 @@ const fill = { {['red', 'orange', 'yellow', 'green', 'blue', 'violet'].map(c => { let next = step + 100/6 - const stop = <> + const stop = - + step = next return stop })} @@ -81,7 +81,7 @@ const Logo = ({ size=false, className='stroke-0', theme='light', fill=false, str return ( - {fill[theme]} + {fill && fill[theme]} diff --git a/packages/freesewing.shared/components/mdx/example/index.js b/packages/freesewing.shared/components/mdx/example/index.js index 180905d591b..d32ac4c92a3 100644 --- a/packages/freesewing.shared/components/mdx/example/index.js +++ b/packages/freesewing.shared/components/mdx/example/index.js @@ -44,7 +44,6 @@ const Pattern = props => { children=null, options = {}, measurements = { head: 390}, - settings, part = '', sample, svgOnly=false, @@ -85,10 +84,10 @@ const Pattern = props => { } /* Set up settings object */ - settings = { + const settings = { options: { ...options }, measurements: { ...measurements }, - ...settings + ...props.settings } // Support for options_ prefix for (const [key, val] of Object.entries(props)) { diff --git a/packages/freesewing.shared/components/mdx/highlight.js b/packages/freesewing.shared/components/mdx/highlight.js index 3abe439e708..3d321d51125 100644 --- a/packages/freesewing.shared/components/mdx/highlight.js +++ b/packages/freesewing.shared/components/mdx/highlight.js @@ -8,8 +8,9 @@ const names = { const Highlight = (props) => { - const { children=[], className='language-js' } = props - const language = props.children.props.className.split('-').pop() + const language = props.children + ? props.children.props.className.split('-').pop() + : 'txt' return (
    diff --git a/packages/freesewing.shared/components/mdx/prev-next.js b/packages/freesewing.shared/components/mdx/prev-next.js index 8249f8f538a..71fd9c89b47 100644 --- a/packages/freesewing.shared/components/mdx/prev-next.js +++ b/packages/freesewing.shared/components/mdx/prev-next.js @@ -1,8 +1,6 @@ import get from 'lodash.get' import orderBy from 'lodash.orderby' import Link from 'next/link' -import Right from 'shared/components/icons/right.js' -import Left from 'shared/components/icons/left.js' // helper method to order nav entries const order = obj => orderBy(obj, ['__order', '__title'], ['asc', 'asc']) diff --git a/packages/freesewing.shared/components/navigation/primary.js b/packages/freesewing.shared/components/navigation/primary.js index 5945a42a944..3b0045b162e 100644 --- a/packages/freesewing.shared/components/navigation/primary.js +++ b/packages/freesewing.shared/components/navigation/primary.js @@ -1,10 +1,7 @@ -import get from 'lodash.get' import Link from 'next/link' import orderBy from 'lodash.orderby' -import Logo from 'shared/components/logos/freesewing.js' import ThemePicker from 'shared/components/theme-picker.js' import RssIcon from 'shared/components/icons/rss.js' -import ThemeIcon from 'shared/components/icons/theme.js' import TutorialIcon from 'shared/components/icons/tutorial.js' import GuideIcon from 'shared/components/icons/guide.js' import HelpIcon from 'shared/components/icons/help.js' @@ -102,7 +99,7 @@ const SubLevel = ({ nodes={}, active }) => ( {child.__slug === active ? <>• : <>°} - { child?.__linktitle || child.__title } + { child.__linktitle || child.__title } diff --git a/packages/freesewing.shared/components/popout.js b/packages/freesewing.shared/components/popout.js index 5c5d34cc8c3..cd8cbccab8e 100644 --- a/packages/freesewing.shared/components/popout.js +++ b/packages/freesewing.shared/components/popout.js @@ -10,19 +10,19 @@ const colors = { } let forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    -forceTailwind =

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    +forceTailwind +=

    const Popout = (props) => { let type = 'none' diff --git a/packages/freesewing.shared/package.json b/packages/freesewing.shared/package.json index 121e6b9d938..2aee45110c9 100644 --- a/packages/freesewing.shared/package.json +++ b/packages/freesewing.shared/package.json @@ -22,8 +22,7 @@ "remark-extract-frontmatter": "^3.2.0", "remark-frontmatter": "^4.0.1", "to-vfile": "^7.2.2", - "unist-util-visit": "^4.1.0", - "vfile-reporter": "^7.0.3" + "unist-util-visit": "^4.1.0" }, "devDependencies": { "autoprefixer": "^10.4.0", diff --git a/packages/freesewing.shared/prebuild/mdx.mjs b/packages/freesewing.shared/prebuild/mdx.mjs index f09cd96a188..8a73edb1c17 100644 --- a/packages/freesewing.shared/prebuild/mdx.mjs +++ b/packages/freesewing.shared/prebuild/mdx.mjs @@ -1,14 +1,12 @@ import path from 'path' import fs from 'fs' -import { languages, strapiHost } from '../config/freesewing.mjs' +import { languages } from '../config/freesewing.mjs' import rdir from 'recursive-readdir' import { unified } from 'unified' import remarkParser from 'remark-parse' import remarkCompiler from 'remark-stringify' import remarkFrontmatter from 'remark-frontmatter' import remarkFrontmatterExtractor from 'remark-extract-frontmatter' -import remarkMdx from 'remark-mdx' -import vfileReporter from 'vfile-reporter' import { readSync } from 'to-vfile' import yaml from 'js-yaml' @@ -106,14 +104,11 @@ export const prebuildMdx = async(site) => { const slug = fileToSlug(file, site, lang) if (slug) { const meta = await mdxMetaInfo(file) - if (meta?.data?.title && meta?.data?.title) { + if (meta.data?.title && meta.data?.title) { pages[lang][slug] = { title: meta.data.title, - order: meta.data.order - ? meta.data.order+meta.data.title - : meta.data.title, slug, - order: meta?.data?.order + order: meta.data?.order ? `${meta.data.order}${meta.data.title}` : meta.data.title } diff --git a/packages/freesewing.shared/prebuild/navigation.mjs b/packages/freesewing.shared/prebuild/navigation.mjs index e4a63b9e841..82cf0958d32 100644 --- a/packages/freesewing.shared/prebuild/navigation.mjs +++ b/packages/freesewing.shared/prebuild/navigation.mjs @@ -1,7 +1,6 @@ import path from 'path' import fs from 'fs' import set from 'lodash.set' -import get from 'lodash.get' // Some arbitrary future time const future = new Date('10-12-2026').getTime() @@ -51,4 +50,5 @@ export const prebuildNavigation = (mdxPages, strapiPosts, site) => { `export default ${JSON.stringify(nav, null ,2)}` ) + return true } diff --git a/packages/freesewing.shared/prebuild/strapi.mjs b/packages/freesewing.shared/prebuild/strapi.mjs index 80419829bb3..8088346ea6f 100644 --- a/packages/freesewing.shared/prebuild/strapi.mjs +++ b/packages/freesewing.shared/prebuild/strapi.mjs @@ -91,7 +91,7 @@ export const prebuildStrapi = async(site) => { date: post.date, slug: post.slug, author: post.author, - img: post?.image?.formats?.large?.url || 'https://posts.freesewing.org/uploads/logo_8401e711e4.png' + img: post.image?.formats?.large?.url || 'https://posts.freesewing.org/uploads/logo_8401e711e4.png' })), null, 2)}` ) for (const [slug, post] of Object.entries(posts[lang][type])) { diff --git a/packages/freesewing.shared/strapi/loader.js b/packages/freesewing.shared/strapi/loader.js index 651844095e5..f3d329e6c52 100644 --- a/packages/freesewing.shared/strapi/loader.js +++ b/packages/freesewing.shared/strapi/loader.js @@ -8,7 +8,6 @@ import { compile } from '@mdx-js/mdx' // Remark plugins we want to use import remarkFrontmatter from 'remark-frontmatter' import remarkGfm from 'remark-gfm' -import remarkCopyLinkedFiles from 'remark-copy-linked-files' // Rehype plugins we want to use import rehypeHighlight from 'rehype-highlight' diff --git a/packages/freesewing.shared/strapi/qa.mjs b/packages/freesewing.shared/strapi/qa.mjs index 1579c96dbf3..9fb777e255b 100644 --- a/packages/freesewing.shared/strapi/qa.mjs +++ b/packages/freesewing.shared/strapi/qa.mjs @@ -1,9 +1,7 @@ /* * This tries to fix as many Strapi things as possible */ -import axios from 'axios' -import { languages as allLanguages, strapiHost } from '../config/freesewing.mjs' -import {getPosts } from '../prebuild/strapi.mjs' +import { languages as allLanguages } from '../config/freesewing.mjs' // What types of content to load const content = { diff --git a/packages/freesewing.shared/themes/dark.js b/packages/freesewing.shared/themes/dark.js index 88a1fe9aecf..f286b4b2d63 100644 --- a/packages/freesewing.shared/themes/dark.js +++ b/packages/freesewing.shared/themes/dark.js @@ -1,5 +1,4 @@ const colors = require('tailwindcss/colors') -const gray = colors.neutral module.exports = { 'fontFamily': '-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif', diff --git a/packages/freesewing.shared/themes/hax0r.js b/packages/freesewing.shared/themes/hax0r.js index 9fe7a34d57c..d8a0c40de6e 100644 --- a/packages/freesewing.shared/themes/hax0r.js +++ b/packages/freesewing.shared/themes/hax0r.js @@ -74,14 +74,6 @@ module.exports = { '--pattern-mark': colors.blue['500'], '--pattern-contrast': colors.pink['500'], '--pattern-note': colors.violet['500'], - '--pattern-fabric': colors.neutral['700'], - '--pattern-lining': colors.emerald['500'], - '--pattern-interfacing': colors.neutral['400'], - '--pattern-canvas': colors.amber['600'], - '--pattern-various': colors.red['500'], - '--pattern-mark': colors.blue['500'], - '--pattern-contrast': colors.pink['500'], - '--pattern-note': colors.violet['500'], '--pattern-dev-0': colors.red['500'], '--pattern-dev-1': colors.green['500'], diff --git a/packages/plugin-banner/tests/shared.test.mjs b/packages/plugin-banner/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-banner/tests/shared.test.mjs +++ b/packages/plugin-banner/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-bartack/tests/shared.test.mjs b/packages/plugin-bartack/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-bartack/tests/shared.test.mjs +++ b/packages/plugin-bartack/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-bundle/tests/shared.test.mjs b/packages/plugin-bundle/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-bundle/tests/shared.test.mjs +++ b/packages/plugin-bundle/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-bust/tests/shared.test.mjs b/packages/plugin-bust/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-bust/tests/shared.test.mjs +++ b/packages/plugin-bust/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-buttons/tests/shared.test.mjs b/packages/plugin-buttons/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-buttons/tests/shared.test.mjs +++ b/packages/plugin-buttons/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-cutonfold/tests/shared.test.mjs b/packages/plugin-cutonfold/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-cutonfold/tests/shared.test.mjs +++ b/packages/plugin-cutonfold/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-dimension/tests/shared.test.mjs b/packages/plugin-dimension/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-dimension/tests/shared.test.mjs +++ b/packages/plugin-dimension/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-export-dxf/tests/shared.test.mjs b/packages/plugin-export-dxf/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-export-dxf/tests/shared.test.mjs +++ b/packages/plugin-export-dxf/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-flip/tests/shared.test.mjs b/packages/plugin-flip/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-flip/tests/shared.test.mjs +++ b/packages/plugin-flip/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-gore/tests/shared.test.mjs b/packages/plugin-gore/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-gore/tests/shared.test.mjs +++ b/packages/plugin-gore/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-grainline/tests/shared.test.mjs b/packages/plugin-grainline/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-grainline/tests/shared.test.mjs +++ b/packages/plugin-grainline/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-i18n/tests/shared.test.mjs b/packages/plugin-i18n/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-i18n/tests/shared.test.mjs +++ b/packages/plugin-i18n/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-logo/tests/shared.test.mjs b/packages/plugin-logo/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-logo/tests/shared.test.mjs +++ b/packages/plugin-logo/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-measurements/tests/shared.test.mjs b/packages/plugin-measurements/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-measurements/tests/shared.test.mjs +++ b/packages/plugin-measurements/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-mirror/tests/shared.test.mjs b/packages/plugin-mirror/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-mirror/tests/shared.test.mjs +++ b/packages/plugin-mirror/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-notches/tests/shared.test.mjs b/packages/plugin-notches/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-notches/tests/shared.test.mjs +++ b/packages/plugin-notches/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-round/tests/shared.test.mjs b/packages/plugin-round/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-round/tests/shared.test.mjs +++ b/packages/plugin-round/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-scalebox/tests/shared.test.mjs b/packages/plugin-scalebox/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-scalebox/tests/shared.test.mjs +++ b/packages/plugin-scalebox/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-sprinkle/tests/shared.test.mjs b/packages/plugin-sprinkle/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-sprinkle/tests/shared.test.mjs +++ b/packages/plugin-sprinkle/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-svgattr/tests/shared.test.mjs b/packages/plugin-svgattr/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-svgattr/tests/shared.test.mjs +++ b/packages/plugin-svgattr/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-theme/tests/shared.test.mjs b/packages/plugin-theme/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-theme/tests/shared.test.mjs +++ b/packages/plugin-theme/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-title/tests/shared.test.mjs b/packages/plugin-title/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-title/tests/shared.test.mjs +++ b/packages/plugin-title/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-validate/src/index.js b/packages/plugin-validate/src/index.js index 16d8f2c9997..a736f74fa88 100644 --- a/packages/plugin-validate/src/index.js +++ b/packages/plugin-validate/src/index.js @@ -1,5 +1,4 @@ import { version, name } from '../package.json' -import validate from './validate' const err = 'FIXME: plugin-validate is not updated for recent core versions' export default { diff --git a/packages/plugin-validate/tests/shared.test.mjs b/packages/plugin-validate/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-validate/tests/shared.test.mjs +++ b/packages/plugin-validate/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugin-versionfree-svg/tests/shared.test.mjs b/packages/plugin-versionfree-svg/tests/shared.test.mjs index 42cd98f4655..d6732ed0838 100644 --- a/packages/plugin-versionfree-svg/tests/shared.test.mjs +++ b/packages/plugin-versionfree-svg/tests/shared.test.mjs @@ -1,10 +1,8 @@ // This file is auto-generated. // Changes you make will be overwritten. -import freesewing from '@freesewing/core' -import chai from 'chai' import plugin from '../dist/index.mjs' import { sharedPluginTests } from '../../../tests/plugins/shared.mjs' // Run shared tests -sharedPluginTests(plugin, freesewing, chai.expect) +sharedPluginTests(plugin) diff --git a/packages/plugintest/src/plugin-gore.js b/packages/plugintest/src/plugin-gore.js index c4db16c3d16..ec9059a3b65 100644 --- a/packages/plugintest/src/plugin-gore.js +++ b/packages/plugintest/src/plugin-gore.js @@ -1,5 +1,5 @@ const draftDimension = (part) => { - const { points, Point, paths, Path, snippets, Snippet, options, macro } = part.shorthand() + const { points, Point, options, macro } = part.shorthand() if (['gore', 'all'].indexOf(options.plugin) !== -1) { points.start = new Point(10, 10) diff --git a/packages/plugintest/src/plugin-i18n.js b/packages/plugintest/src/plugin-i18n.js index 02f69eee785..c9fc2ccdc7f 100644 --- a/packages/plugintest/src/plugin-i18n.js +++ b/packages/plugintest/src/plugin-i18n.js @@ -1,5 +1,5 @@ const draftI18n = (part) => { - const { points, Point, paths, Path, options, macro, settings } = part.shorthand() + const { points, Point, paths, Path, options } = part.shorthand() if (['i18n', 'all'].indexOf(options.plugin) !== -1) { points.a = new Point(0, 0).attr('data-text', 'cutTwoStripsToFinishTheArmholes') diff --git a/packages/plugintest/src/plugin-logo.js b/packages/plugintest/src/plugin-logo.js index 3485f40d118..e1a964dfbfb 100644 --- a/packages/plugintest/src/plugin-logo.js +++ b/packages/plugintest/src/plugin-logo.js @@ -1,12 +1,3 @@ -const addThese = [ - 'button', - 'buttonhole', - 'buttonhole-start', - 'buttonhole-end', - 'snap-stud', - 'snap-socket', -] - const draftButtons = (part) => { const { points, Point, paths, Path, snippets, Snippet, options } = part.shorthand() diff --git a/packages/plugintest/src/plugin-scalebox.js b/packages/plugintest/src/plugin-scalebox.js index b3be4535f0a..59fabe1579f 100644 --- a/packages/plugintest/src/plugin-scalebox.js +++ b/packages/plugintest/src/plugin-scalebox.js @@ -1,5 +1,5 @@ const draftScalebox = (part) => { - const { Point, points, Path, paths, macro, options } = part.shorthand() + const { Point, points, macro, options } = part.shorthand() if (['scalebox', 'all'].indexOf(options.plugin) !== -1) { points.a = new Point(0, 0) diff --git a/packages/rendertest/src/circles.js b/packages/rendertest/src/circles.js index f69da4a42cd..5f13cd6228a 100644 --- a/packages/rendertest/src/circles.js +++ b/packages/rendertest/src/circles.js @@ -1,10 +1,9 @@ export default function (part, demo = false) { - const { Point, Path, points, paths, store, options } = part.shorthand() + const { Point, points, store, options } = part.shorthand() if (options.only === 'circles' || demo) { let y = store.get('y') const w = store.get('w') - let colors = store.get('colors') y += w / 8 + 5 for (let i = 1; i < 6; i++) { diff --git a/packages/rendertest/src/demo.js b/packages/rendertest/src/demo.js index 78bacb2f4c4..a8798c5446f 100644 --- a/packages/rendertest/src/demo.js +++ b/packages/rendertest/src/demo.js @@ -8,7 +8,7 @@ import snippets from './snippets.js' import macros from './macros.js' export default function (part) { - const { macro, store, options, Path, paths, Point } = part.shorthand() + const { store, options, Path, paths, Point } = part.shorthand() // Keep things in store store.set('y', 0) diff --git a/tests/plugins/shared.mjs b/tests/plugins/shared.mjs index d5d2b5d6c11..12c87fab6ac 100644 --- a/tests/plugins/shared.mjs +++ b/tests/plugins/shared.mjs @@ -5,8 +5,6 @@ import chai from 'chai' * It expects the following: * * @param object plugin: The plugin object - * @param object freesewing: Imported @freesewing/core - * @param object expect: Imported chai.expect */ export const sharedPluginTests = plugin => {