Skip to content

Commit

Permalink
fix: ignore ts error when importing an auto-generated file
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed May 11, 2024
1 parent 989c46a commit 65e139c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 16 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
**/dist/*
**/node_modules/*
**/out/*
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"postinstall": "husky install",
"clean": "rm -rf node_modules/ output/ */*/node_modules */*/dist */*/tsconfig.tsbuildinfo",
"build": "tsc --build packages/**/tsconfig.json",
"lint": "yarn build && eslint . --ignore-pattern=node_modules --ignore-pattern=output --ignore-pattern=dist --ext .js,.jsx,.ts",
"lint": "yarn build && eslint . --ignore-pattern=node_modules --ignore-pattern=output --ignore-pattern=dist --ext .js,.jsx,.ts,.tsx",
"test": "yarn build && vitest run --exclude '**/integration.test.ts'",
"test:integration": "yarn build && vitest watch integration.test.ts",
"test:watch": "yarn build && vitest watch --exclude '**/integration.test.ts'",
Expand Down
5 changes: 3 additions & 2 deletions packages/website/src/components/GitHubLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// eslint-disable-next-line import/no-unresolved, import/extensions
import { iconMarkGithub } from '../../output/es6-dataurl-octicons/icons/octicons-by-github';
import { iconMarkGithub }
// @ts-ignore This imported file in auto-generated
from '../../output/es6-dataurl-octicons/icons/octicons-by-github';

const GitHubLink = () => (
<div className="github-link">
Expand Down
12 changes: 7 additions & 5 deletions packages/website/src/components/SvgOcticons.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// eslint-disable-next-line import/no-unresolved, import/extensions
import * as Octicons from '../../output/es6-dataurl-octicons/icons/octicons-by-github';
import * as Octicons
// @ts-ignore This imported file in auto-generated
from '../../output/es6-dataurl-octicons/icons/octicons-by-github';

// eslint-disable-next-line import/no-unresolved, import/extensions
import { figmaArrow } from '../../output/es6-dataurl/icons';
import { figmaArrow }
// @ts-ignore This imported file in auto-generated
from '../../output/es6-dataurl/icons';

const SvgOcticons = () => (
<div className="octicons">
Expand All @@ -19,7 +21,7 @@ const SvgOcticons = () => (
<div className="icons">
{
Object.values(Octicons).reverse().map(
(octicon, index) => <img key={index} className="icon" alt={`Icon ${index}`} src={octicon} />
(octicon, index) => <img key={index} className="icon" alt={`Icon ${index}`} src={octicon as string} />
)
}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import CodeBlock from '@/components/CodeBlock';

// eslint-disable-next-line import/no-unresolved, import/extensions
import { figmaExport, figmaLogo } from '../../../output/es6-base64/icons';
import { figmaExport, figmaLogo }
// @ts-ignore This imported file in auto-generated
from '../../../output/es6-base64/icons';

const props = {
title: (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import CodeBlock from '@/components/CodeBlock';

// eslint-disable-next-line import/no-unresolved, import/extensions
import { figmaExport, figmaLogo } from '../../../output/es6-dataurl/icons';
import { figmaExport, figmaLogo }
// @ts-ignore This imported file in auto-generated
from '../../../output/es6-dataurl/icons';

const props = {
title: (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import CodeBlock from '@/components/CodeBlock';

// eslint-disable-next-line import/no-unresolved, import/extensions
import * as FigmaIcons from '../../../output/svgr/icons';
import * as FigmaIcons
// @ts-ignore This imported file in auto-generated
from '../../../output/svgr/icons';

// eslint-disable-next-line import/no-unresolved, import/extensions
import { Squirrel } from '../../../output/svgr-octicons/icons/octicons-by-github';
import { Squirrel }
// @ts-ignore This imported file in auto-generated
from '../../../output/svgr-octicons/icons/octicons-by-github';

const props = {
title: (
Expand Down

0 comments on commit 65e139c

Please sign in to comment.