Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Oct 16, 2020
1 parent 9d69cdc commit 5094112
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 20 deletions.
3 changes: 1 addition & 2 deletions core/instrument/src/babel/esm-stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ export const extractCSFStories = (
},
});
if (store.doc) {
//@ts-ignore
store.doc.componentsLookup = components;
store.doc.componentsLookup = components as Document['componentsLookup'];
} else {
throw new Error(`esm files should have one default export`);
}
Expand Down
3 changes: 1 addition & 2 deletions core/instrument/src/babel/mdx-stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ export const extractMDXStories = (props: any) => (
}
if (store.doc && typeof store.doc.subcomponents === 'object') {
Object.keys(store.doc.subcomponents).forEach((name: any) => {
//@ts-ignore
const sub = store.doc.subcomponents[name];
const sub = store.doc?.subcomponents?.[name];
newComps[sub as string] = undefined;
});
}
Expand Down
2 changes: 0 additions & 2 deletions core/instrument/src/misc/package-info.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import * as fs from 'fs';
import * as path from 'path';
//@ts-ignore
import readJson from 'read-package-json';
import hostedGitInfo from 'hosted-git-info';
//@ts-ignore
import parseRepositoryURL from '@hutson/parse-repository-url';
import { PackageInfo } from '@component-controls/core';
import { hashStoreId } from './hashStore';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Object {
"eslint-plugin-mdx": "^1.6.8",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.2",
"eslint-plugin-react-hooks": "^4.1.2",
"husky": "^3.0.0",
"jest": "^26.4.2",
"lerna": "^3.22.1",
Expand Down
3 changes: 1 addition & 2 deletions core/store/src/state/context/categories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export const useDocsByCategory = (category: string, value?: any): Pages => {
Object.keys(docs)
.filter(key => {
const doc = docs[key];
//@ts-ignore
const catValue = doc[category];
const catValue = (doc as any)[category];
if (value === undefined) {
return catValue !== undefined;
}
Expand Down
3 changes: 1 addition & 2 deletions core/store/src/state/recoil/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ export const useDocsByCategory = (category: string, value?: any): Pages => {
return Object.keys(docs)
.filter(key => {
const doc = docs[key];
//@ts-ignore
const catValue = doc[category];
const catValue = (doc as any)[category];
if (value === undefined) {
return catValue !== undefined;
}
Expand Down
1 change: 1 addition & 0 deletions integrations/gatsby-theme-stories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"devDependencies": {
"@component-controls/ts-markdown-docs": "^1.21.0",
"@types/react": "^16.9.34",
"eslint-plugin-react-hooks": "^4.1.2",
"typescript": "^3.8.3"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export const GatsbyLink: FC<LinkProps & { to?: string }> = ({
const store = useStore();
const homePath = useMemo(() => getHomePath(store), [store]);
const link = href || to || homePath;
//@ts-ignore
//
return link ? <Link to={link} {...props} activeClassName="active" /> : null;
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"eslint-plugin-mdx": "^1.6.8",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.0.2",
"eslint-plugin-react-hooks": "^4.1.2",
"husky": "^3.0.0",
"jest": "^26.4.2",
"lerna": "^3.22.1",
Expand Down
5 changes: 3 additions & 2 deletions ui/components/src/Link/LinkContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ export const LinkContextProvider: FC<LinkContextProviderProps> = ({
}) => {
return (
<LinkContext.Provider
//@ts-ignore
value={props => <Box variant="styles.a" as={LinkClass} {...props} />}
value={(props: any) => (
<Box variant="styles.a" as={LinkClass} {...props} />
)}
>
{children}
</LinkContext.Provider>
Expand Down
1 change: 0 additions & 1 deletion ui/components/src/ThemeContext/ThemeContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export const ThemeProvider: FC<ThemeProviderProps> = ({
>
<ThemeUIProvider
theme={theme}
//@ts-ignore
components={{ ...markdownComponents, ...components }}
>
{children}
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11604,10 +11604,10 @@ eslint-plugin-react-hooks@^1.7.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04"
integrity sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA==

eslint-plugin-react-hooks@^4.0.2:
version "4.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.1.0.tgz#6323fbd5e650e84b2987ba76370523a60f4e7925"
integrity sha512-36zilUcDwDReiORXmcmTc6rRumu9JIM3WjSvV0nclHoUQ0CNrX866EwONvLR/UqaeqFutbAnVu8PEmctdo2SRQ==
eslint-plugin-react-hooks@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.1.2.tgz#2eb53731d11c95826ef7a7272303eabb5c9a271e"
integrity sha512-ykUeqkGyUGgwTtk78C0o8UG2fzwmgJ0qxBGPp2WqRKsTwcLuVf01kTDRAtOsd4u6whX2XOC8749n2vPydP82fg==

eslint-plugin-react@^7.19.0, eslint-plugin-react@^7.20.6:
version "7.20.6"
Expand Down

0 comments on commit 5094112

Please sign in to comment.