Add json type assertions for import statements.
This commit is contained in:
parent
8d192f6680
commit
bd83fd6036
37 changed files with 37 additions and 37 deletions
|
@ -1,4 +1,4 @@
|
|||
import { version } from './package.json'
|
||||
import { version } from './package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: '{{name}}',
|
||||
|
|
|
@ -8,7 +8,7 @@ import pack from 'bin-pack'
|
|||
import Store from './store'
|
||||
import Hooks from './hooks'
|
||||
import Attributes from './attributes'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default function Pattern(config = { options: {} }) {
|
||||
// Default settings
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Attributes from './attributes'
|
||||
import { round } from './utils'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
function Svg(pattern) {
|
||||
this.openGroups = []
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { version } from '../package.json'
|
||||
import { version } from '../package.json' assert { type: 'json' }
|
||||
import { config as bellaConfig } from '@freesewing/bella'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { version } from '../package.json'
|
||||
import { version } from '../package.json' assert { type: 'json' }
|
||||
import { config as bentConfig } from '@freesewing/bent'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { version } from '../package.json'
|
||||
import { version } from '../package.json' assert { type: 'json' }
|
||||
import { config as breannaConfig } from '@freesewing/breanna'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { version } from '../package.json'
|
||||
import { version } from '../package.json' assert { type: 'json' }
|
||||
import { config as brianConfig } from '@freesewing/brian'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { version } from '../package.json'
|
||||
import { version } from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: '{{name}}',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { version } from '../package.json'
|
||||
import { version } from '../package.json' assert { type: 'json' }
|
||||
import { config as titanConfig } from '@freesewing/titan'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
import bartack from './bartack'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -13,7 +13,7 @@ import scalebox from '@freesewing/plugin-scalebox'
|
|||
import round from '@freesewing/plugin-round'
|
||||
import sprinkle from '@freesewing/plugin-sprinkle'
|
||||
import measurements from '@freesewing/plugin-measurements'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const bundledPlugins = [
|
||||
banner,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import button from './button'
|
||||
import buttonhole from './buttonhole'
|
||||
import snaps from './snaps'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import markers from './lib/markers'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import markers from './lib/markers'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const prefix = '__paperless'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import markers from './markers'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const dflts = {
|
||||
text: 'grainline',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import logo from './logo'
|
||||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export {logo}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const lineValues = (start, end) => {
|
||||
const { x: x1, y: y1 } = start
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const notches =
|
||||
'<g id="notch"><circle cy="0" cx="0" r="1.4" class="fill-note" /><circle cy="0" cx="0" r="2.8" class="note" /></g><g id="bnotch"><path d="M -1.1 -1.1 L 1.1 1.1 M 1.1 -1.1 L -1.1 1.1" class="note" /><circle cy="0" cx="0" r="2.8" class="note" /></g>'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
import scalebox from './scalebox'
|
||||
import miniscale from './miniscale'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
import gridMetric from './defs/grid-metric'
|
||||
import gridImperial from './defs/grid-imperial'
|
||||
import draft from './lib/draft'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
const style = `
|
||||
text.title-nr {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import pkg from '../package.json'
|
||||
import pkg from '../package.json' assert { type: 'json' }
|
||||
|
||||
export default {
|
||||
name: pkg.name,
|
||||
|
|
|
@ -6,7 +6,7 @@ import { banner } from './banner.mjs'
|
|||
import mustache from 'mustache'
|
||||
import { execSync } from 'child_process'
|
||||
// Software
|
||||
import designs from '../config/software/designs.json'
|
||||
import designs from '../config/software/designs.json' assert { type: 'json' }
|
||||
|
||||
const type = process.argv[2]
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React from 'react'
|
||||
import VersionsIcon from 'shared/components/icons/versions.js'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import versions from 'site/versions.json'
|
||||
import versions from 'site/versions.json' assert { type: 'json' }
|
||||
import useVersion from 'site/hooks/useVersion.js'
|
||||
import {Picker, PickerLink} from 'shared/components/picker'
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import { useTranslation } from 'next-i18next'
|
|||
import { formatVersionTitle } from 'site/components/version-picker.js'
|
||||
import Layout from 'site/components/layouts/bare'
|
||||
import { PageTitle } from 'shared/components/layouts/default'
|
||||
import availableVersions from 'site/available-versions.json'
|
||||
import availableVersions from 'site/available-versions.json' assert { type: 'json' }
|
||||
|
||||
const DesignLinks = ({ list, prefix='', version=false }) => {
|
||||
const { t } = useTranslation(['patterns'])
|
||||
|
|
|
@ -5,7 +5,7 @@ import Link from 'next/link'
|
|||
import { formatVersionTitle } from 'site/components/version-picker.js'
|
||||
import Layout from 'site/components/layouts/bare'
|
||||
import { PageTitle } from 'shared/components/layouts/default'
|
||||
import availableVersions from 'site/available-versions.json'
|
||||
import availableVersions from 'site/available-versions.json' assert { type: 'json' }
|
||||
|
||||
const DesignLinks = ({ list, prefix='', version=false }) => (
|
||||
<ul className="flex flex-row flex-wrap ml-8">
|
||||
|
|
|
@ -3,7 +3,7 @@ import useApp from 'site/hooks/useApp.js'
|
|||
import PageLink from 'shared/components/page-link'
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import designs from 'shared/config/designs.json'
|
||||
import designs from 'shared/config/designs.json' assert { type: 'json' }
|
||||
import Design from 'site/components/design.js'
|
||||
|
||||
// Don't bother with utilities
|
||||
|
|
|
@ -4,7 +4,7 @@ import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
|||
import { strapiHost } from 'shared/config/freesewing.mjs'
|
||||
import { strapiImage } from 'shared/utils.js'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import designs from 'shared/config/designs.json'
|
||||
import designs from 'shared/config/designs.json' assert { type: 'json' }
|
||||
import { PreviewTile } from '../index.js'
|
||||
|
||||
const DesignIndexPage = (props) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue