chore: Remove lint
This commit is contained in:
parent
4d52d8970a
commit
2bbc3cad0e
6 changed files with 10 additions and 24 deletions
|
@ -1,14 +1,13 @@
|
||||||
import { config } from './config.mjs'
|
import { config } from './config.mjs'
|
||||||
import { mkdir, readFile, writeFile, copyFile, open, opendir } from 'node:fs/promises'
|
import { mkdir, writeFile, copyFile, open, opendir } from 'node:fs/promises'
|
||||||
import { join, dirname, relative } from 'path'
|
import { join, dirname } from 'path'
|
||||||
import mustache from 'mustache'
|
import mustache from 'mustache'
|
||||||
import rdir from 'recursive-readdir'
|
|
||||||
import chalk from 'chalk'
|
import chalk from 'chalk'
|
||||||
import prompts from 'prompts'
|
import prompts from 'prompts'
|
||||||
import { oraPromise } from 'ora'
|
import { oraPromise } from 'ora'
|
||||||
import { execa } from 'execa'
|
import { execa } from 'execa'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { fileURLToPath, pathToFileURL } from 'url'
|
import { fileURLToPath } from 'url'
|
||||||
|
|
||||||
// Current working directory
|
// Current working directory
|
||||||
let filename
|
let filename
|
||||||
|
@ -18,7 +17,6 @@ try {
|
||||||
filename = fileURLToPath(new URL(import.meta.url))
|
filename = fileURLToPath(new URL(import.meta.url))
|
||||||
}
|
}
|
||||||
const newDesignDir = join(filename, '../..')
|
const newDesignDir = join(filename, '../..')
|
||||||
const designSrcDir = 'design/src'
|
|
||||||
|
|
||||||
const nl = '\n'
|
const nl = '\n'
|
||||||
const tab = ' '
|
const tab = ' '
|
||||||
|
@ -126,8 +124,6 @@ export const getChoices = async () => {
|
||||||
return { name, manager, overwrite, sideStep }
|
return { name, manager, overwrite, sideStep }
|
||||||
}
|
}
|
||||||
|
|
||||||
const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1)
|
|
||||||
|
|
||||||
// Keep track of directories that need to be created
|
// Keep track of directories that need to be created
|
||||||
const dirPromises = {}
|
const dirPromises = {}
|
||||||
const ensureDir = async (file, suppress = false) => {
|
const ensureDir = async (file, suppress = false) => {
|
||||||
|
|
|
@ -7,16 +7,11 @@ import { useTheme } from 'shared/hooks/use-theme.mjs'
|
||||||
import { ModalContext } from 'shared/context/modal-context.mjs'
|
import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||||
// Components
|
// Components
|
||||||
import {
|
import {
|
||||||
DesignIcon,
|
|
||||||
DocsIcon,
|
DocsIcon,
|
||||||
MenuIcon,
|
|
||||||
LockIcon,
|
LockIcon,
|
||||||
ThemeIcon,
|
ThemeIcon,
|
||||||
I18nIcon,
|
I18nIcon,
|
||||||
MeasieIcon,
|
|
||||||
NewPatternIcon,
|
|
||||||
GitHubIcon,
|
GitHubIcon,
|
||||||
PlusIcon,
|
|
||||||
HelpIcon,
|
HelpIcon,
|
||||||
HomeIcon,
|
HomeIcon,
|
||||||
RocketIcon,
|
RocketIcon,
|
||||||
|
@ -24,7 +19,6 @@ import {
|
||||||
import { HeaderWrapper } from 'shared/components/wrappers/header.mjs'
|
import { HeaderWrapper } from 'shared/components/wrappers/header.mjs'
|
||||||
import { ModalThemePicker, ns as themeNs } from 'shared/components/modal/theme-picker.mjs'
|
import { ModalThemePicker, ns as themeNs } from 'shared/components/modal/theme-picker.mjs'
|
||||||
import { ModalLocalePicker, ns as localeNs } from 'shared/components/modal/locale-picker.mjs'
|
import { ModalLocalePicker, ns as localeNs } from 'shared/components/modal/locale-picker.mjs'
|
||||||
import { ModalMenu } from 'site/components/navigation/modal-menu.mjs'
|
|
||||||
import { ModalDesignPicker } from './design-picker.mjs'
|
import { ModalDesignPicker } from './design-picker.mjs'
|
||||||
|
|
||||||
import { NavButton, NavSpacer } from 'shared/components/header.mjs'
|
import { NavButton, NavSpacer } from 'shared/components/header.mjs'
|
||||||
|
|
|
@ -5,12 +5,8 @@ import { nsMerge } from 'shared/utils.mjs'
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
// Components
|
// Components
|
||||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||||
import { Popout, ns as popoutNs } from 'shared/components/popout/index.mjs'
|
|
||||||
import { PageLink, WebLink } from 'shared/components/link.mjs'
|
|
||||||
import { FreeSewingIcon } from 'shared/components/icons.mjs'
|
|
||||||
import { collection } from 'site/hooks/use-design.mjs'
|
|
||||||
|
|
||||||
const ns = nsMerge('sde', 'account', pageNs, popoutNs)
|
const ns = nsMerge('sde', 'account', pageNs)
|
||||||
/*
|
/*
|
||||||
* Each page MUST be wrapped in the PageWrapper component.
|
* Each page MUST be wrapped in the PageWrapper component.
|
||||||
* You also MUST spread props.page into this wrapper component
|
* You also MUST spread props.page into this wrapper component
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
|
import { nsMerge } from 'shared/utils.mjs'
|
||||||
// Components
|
// Components
|
||||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||||
import { Popout } from 'shared/components/popout/index.mjs'
|
|
||||||
// MDX
|
// MDX
|
||||||
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
||||||
import { components } from 'shared/components/mdx/index.mjs'
|
import { components } from 'shared/components/mdx/index.mjs'
|
||||||
|
@ -13,7 +13,7 @@ import nl, { frontmatter as nlFrontmatter } from './nl.mdx'
|
||||||
import fr, { frontmatter as frFrontmatter } from './fr.mdx'
|
import fr, { frontmatter as frFrontmatter } from './fr.mdx'
|
||||||
import uk, { frontmatter as ukFrontmatter } from './uk.mdx'
|
import uk, { frontmatter as ukFrontmatter } from './uk.mdx'
|
||||||
|
|
||||||
const ns = [pageNs, 'sde', 'account']
|
const ns = nsMerge(pageNs, 'sde', 'account')
|
||||||
|
|
||||||
const mdx = { en, de, es, nl, fr, uk }
|
const mdx = { en, de, es, nl, fr, uk }
|
||||||
const frontmatter = {
|
const frontmatter = {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
|
import { nsMerge } from 'shared/utils.mjs'
|
||||||
// Components
|
// Components
|
||||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||||
import { Popout } from 'shared/components/popout/index.mjs'
|
|
||||||
// MDX
|
// MDX
|
||||||
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
||||||
import { components } from 'shared/components/mdx/index.mjs'
|
import { components } from 'shared/components/mdx/index.mjs'
|
||||||
|
@ -13,7 +13,7 @@ import nl, { frontmatter as nlFrontmatter } from './nl.mdx'
|
||||||
import fr, { frontmatter as frFrontmatter } from './fr.mdx'
|
import fr, { frontmatter as frFrontmatter } from './fr.mdx'
|
||||||
import uk, { frontmatter as ukFrontmatter } from './uk.mdx'
|
import uk, { frontmatter as ukFrontmatter } from './uk.mdx'
|
||||||
|
|
||||||
const ns = [pageNs, 'sde', 'account']
|
const ns = nsMerge(pageNs, 'sde', 'account')
|
||||||
|
|
||||||
const mdx = { en, de, es, nl, fr, uk }
|
const mdx = { en, de, es, nl, fr, uk }
|
||||||
const frontmatter = {
|
const frontmatter = {
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
// Dependencies
|
// Dependencies
|
||||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||||
|
import { nsMerge } from 'shared/utils.mjs'
|
||||||
// Hooks
|
// Hooks
|
||||||
import { useTranslation } from 'next-i18next'
|
import { useTranslation } from 'next-i18next'
|
||||||
// Components
|
// Components
|
||||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||||
import { Popout, ns as popoutNs } from 'shared/components/popout/index.mjs'
|
|
||||||
import { PageLink, WebLink } from 'shared/components/link.mjs'
|
import { PageLink, WebLink } from 'shared/components/link.mjs'
|
||||||
import { FreeSewingIcon } from 'shared/components/icons.mjs'
|
import { FreeSewingIcon } from 'shared/components/icons.mjs'
|
||||||
import { collection } from 'site/hooks/use-design.mjs'
|
import { collection } from 'site/hooks/use-design.mjs'
|
||||||
import { version } from '@freesewing/core'
|
import { version } from '@freesewing/core'
|
||||||
|
|
||||||
const ns = ['sde', ...pageNs, ...popoutNs]
|
const ns = nsMerge('sde', pageNs)
|
||||||
/*
|
/*
|
||||||
* Each page MUST be wrapped in the PageWrapper component.
|
* Each page MUST be wrapped in the PageWrapper component.
|
||||||
* You also MUST spread props.page into this wrapper component
|
* You also MUST spread props.page into this wrapper component
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue