1
0
Fork 0

Add json type assertions for import statements.

This commit is contained in:
Benjamin F 2022-08-27 12:02:07 -07:00
parent 8d192f6680
commit bd83fd6036
37 changed files with 37 additions and 37 deletions

View file

@ -1,4 +1,4 @@
import { version } from './package.json'
import { version } from './package.json' assert { type: 'json' }
export default {
name: '{{name}}',

View file

@ -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

View file

@ -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 = []

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -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 {

View file

@ -1,4 +1,4 @@
import { version } from '../package.json'
import { version } from '../package.json' assert { type: 'json' }
export default {
name: '{{name}}',

View file

@ -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 {

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
import bartack from './bartack'
export default {

View file

@ -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,

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -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,

View file

@ -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,

View file

@ -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'

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -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',

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -1,5 +1,5 @@
import logo from './logo'
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export {logo}

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -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

View file

@ -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>'

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -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'

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -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'

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
const style = `
text.title-nr {

View file

@ -1,4 +1,4 @@
import pkg from '../package.json'
import pkg from '../package.json' assert { type: 'json' }
export default {
name: pkg.name,

View file

@ -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]

View file

@ -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'

View file

@ -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'])

View file

@ -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">

View file

@ -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

View file

@ -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) => {