Skip to content

Commit

Permalink
chore(linting): Fixed import linting resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
HHogg committed Jun 2, 2023
1 parent 446c510 commit b39f62e
Show file tree
Hide file tree
Showing 41 changed files with 266 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"typescript": true,
"node": true
}
},
"rules": {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: 'Install Dependencies'
run: yarn
- name: 'Linting'
run: yarn lint
- name: 'Build package'
run: yarn workspace preshape build
- name: 'Linting'
run: yarn lint
- name: 'Build site'
run: yarn workspace site build
- name: 'Publish package'
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .yarn/install-state.gz
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"eslint": "^8.40.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
Expand Down
1 change: 0 additions & 1 deletion workspaces/package/src/DatePicker/DatePickerCalendar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DateTime } from 'luxon';
import React from 'react';
import { Grid } from '../Grid/Grid';
import { Text, TextProps } from '../Text/Text';
import DatePickerDay from './DatePickerDay';
Expand Down
1 change: 0 additions & 1 deletion workspaces/package/src/DatePicker/DatePickerDay.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import classnames from 'classnames';
import { DateTime, Interval } from 'luxon';
import React from 'react';
import { Box, BoxProps } from '../Box/Box';

interface Props extends Omit<BoxProps, 'dateTime' | 'onSelect'> {
Expand Down
1 change: 1 addition & 0 deletions workspaces/package/src/Modal/ModalPadding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const ModalPadding = forwardRef<any, ModalPaddingProps>((props, ref) => {
paddingRight={right ? paddingHorizontal : undefined}
paddingTop={top ? paddingVertical : undefined}
paddingBottom={bottom ? paddingVertical : undefined}
ref={ref}
/>
);
});
2 changes: 1 addition & 1 deletion workspaces/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.11.1",
"typedoc": "^0.24.6"
"typedoc": "^0.24.7"
},
"devDependencies": {
"@svgr/cli": "^5.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const KindRenderer = (props: APIItemProps) => {
const KindRenderer = KindMap[reflection.kind];

if (!KindRenderer) {
// eslint-disable-next-line no-console
console.log(`No kind renderer for '${reflection.kind}'`);
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const TypeRenderer = (props: TypeRendererProps) => {
const TypeRenderer = props.type?.type && typeMap[props.type?.type];

if (!TypeRenderer) {
// eslint-disable-next-line no-console
console.log(`No TypeRenderer for '${props.type?.type}'`);
console.log(props.reflection);
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const TypeRendererReference = (props: PropsWithChildren<Props>) => {
return <TypeRenderer {...props} reflection={api} type={api.type} />;
}

// eslint-disable-next-line no-console
console.log(`TypeRendererReference: unhandled API: ${type.name}`);

return <TypeLabel>{type.name}</TypeLabel>;
Expand Down
2 changes: 1 addition & 1 deletion workspaces/site/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type MenuProps = BoxProps & {
onSelect?: () => void;
};

export const Menu = ({ children, onSelect, ...props }: MenuProps) => {
export const Menu = ({ onSelect, ...props }: MenuProps) => {
const { colors } = useThemeContext();

return (
Expand Down
1 change: 1 addition & 0 deletions workspaces/site/src/docs/catalog/snippets/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable import/no-unresolved */
import { TypeCodeBlockLanguage } from 'preshape';
import SnippetCss from './css.txt?raw';
import SnippetJson from './json.txt?raw';
Expand Down
2 changes: 1 addition & 1 deletion workspaces/site/src/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const catalogue: Record<string, CatalogueItem<any>> = {

export const catalogueListing = Object.entries(catalogue)
.sort(([a], [b]) => a.localeCompare(b))
.map(([_, value]) => value);
.map(([, value]) => value);

export const getCatalogItem = (id?: string, indexShift = 0) => {
if (id) {
Expand Down
12 changes: 6 additions & 6 deletions workspaces/site/src/entry-client.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import { StrictMode } from 'react';
import { createRoot, hydrateRoot } from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import App from './App';

if (process.env.NODE_ENV === 'development') {
ReactDOM.createRoot(document.getElementById('Root') as HTMLElement).render(
<React.StrictMode>
createRoot(document.getElementById('Root') as HTMLElement).render(
<StrictMode>
<BrowserRouter>
<App />
</BrowserRouter>
</React.StrictMode>
</StrictMode>
);
} else {
ReactDOM.hydrateRoot(
hydrateRoot(
document.getElementById('Root')!,
<BrowserRouter>
<App />
Expand Down
4 changes: 2 additions & 2 deletions workspaces/site/src/entry-server.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import ReactDOMServer from 'react-dom/server';
import { renderToString } from 'react-dom/server';
import { StaticRouter } from 'react-router-dom/server';
import App from './App';

export function SSRRender(url: string | Partial<Location>) {
return ReactDOMServer.renderToString(
return renderToString(
<StaticRouter location={url}>
<App />
</StaticRouter>
Expand Down
Loading

0 comments on commit b39f62e

Please sign in to comment.