Skip to content

Commit

Permalink
make lint happier
Browse files Browse the repository at this point in the history
- Remove unused imports
- Remove redundant export names
- Give names to inline functions for better stack trace debugging
  • Loading branch information
ThrawnCA committed Nov 23, 2023
1 parent 76abbaa commit 8350372
Show file tree
Hide file tree
Showing 16 changed files with 6 additions and 36 deletions.
1 change: 0 additions & 1 deletion src/components/BoilerplateButton/BoilerplateButton.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import { createForm, createBuilder } from "../../utils";
import * as BoilerplateButtonStories from "./BoilerplateButton.stories";

<Meta of={BoilerplateButtonStories} />
Expand Down
4 changes: 0 additions & 4 deletions src/components/BoilerplateButton/BoilerplateButton.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ export const Renderer = {
});
},
}),

name: "Renderer",
};

export const Builder = {
Expand All @@ -46,6 +44,4 @@ export const Builder = {
],
},
}),

name: "Builder",
};
1 change: 0 additions & 1 deletion src/components/PdfSubmitButton/PdfSubmitButton.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import { createForm, createBuilder } from "../../utils";
import * as PdfSubmitButtonStories from "./PdfSubmitButton.stories";

<Meta of={PdfSubmitButtonStories} />
Expand Down
4 changes: 0 additions & 4 deletions src/components/PdfSubmitButton/PdfSubmitButton.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export const Renderer = {
});
},
}),

name: "Renderer",
};

export const RendererForMissingPdf = {
Expand Down Expand Up @@ -158,6 +156,4 @@ export const Builder = {
],
},
}),

name: "Builder",
};
1 change: 0 additions & 1 deletion src/components/PlsPlusAddress/PlsPlusAddress.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import { createForm, createBuilder } from "../../utils";
import * as PlsPlusAddressStories from "./PlsPlusAddress.stories";

<Meta of={PlsPlusAddressStories} />
Expand Down
4 changes: 0 additions & 4 deletions src/components/PlsPlusAddress/PlsPlusAddress.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export const Renderer = {
});
},
}),

name: "Renderer",
};

export const Builder = {
Expand Down Expand Up @@ -68,6 +66,4 @@ export const Builder = {
],
},
}),

name: "Builder",
};
1 change: 0 additions & 1 deletion src/components/Radio/Radio.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import { createForm, createBuilder } from "../../utils";
import * as RadioStories from "./Radio.stories";

<Meta of={RadioStories} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/googleLocation/GoogleLocation.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import LocationEditMap from "./editForm/Location.edit.map";

const baseEditForm = Formio.Components.components.base.editForm;

export default function (...extend) {
export default function googleLocationFormWrapper(...extend) {
return baseEditForm(
[
{
Expand Down
1 change: 0 additions & 1 deletion src/components/googleLocation/GoogleLocation.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import { createForm, createBuilder } from "../../utils";
import * as GoogleLocationStories from "./GoogleLocation.stories";

<Meta of={GoogleLocationStories} />
Expand Down
4 changes: 0 additions & 4 deletions src/components/googleLocation/GoogleLocation.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export const Renderer = {
});
},
}),

name: "Renderer",
};

export const Builder = {
Expand Down Expand Up @@ -78,6 +76,4 @@ export const Builder = {
],
},
}),

name: "Builder",
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import OpenStreetMapLocationEditMap from "./editForm/OpenStreetMapLocation.edit.

const baseEditForm = Formio.Components.components.base.editForm;

export default function (...extend) {
export default function openStreetMapFormWrapper(...extend) {
return baseEditForm(
[
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class OpenStreetMapLocation extends TextFieldComponent {
marker.addTo(element.map);
// element.marker = marker;
// this.addMarker(defaultLatlng, "Default Marker", element);
marker.on("moveend", function (event) {
marker.on("moveend", function markerMoveListener(event) {
// marker.addListener("moveend", (event) => {
console.log(event);

Check warning on line 165 in src/components/openStreetMapLocation/OpenStreetMapLocation.js

View workflow job for this annotation

GitHub Actions / Lint test on Node 18

Unexpected console statement

Check warning on line 165 in src/components/openStreetMapLocation/OpenStreetMapLocation.js

View workflow job for this annotation

GitHub Actions / Lint test on Node 18

Unexpected console statement

Check warning on line 165 in src/components/openStreetMapLocation/OpenStreetMapLocation.js

View workflow job for this annotation

GitHub Actions / Build and Deploy on Node 18

Unexpected console statement

Check warning on line 165 in src/components/openStreetMapLocation/OpenStreetMapLocation.js

View workflow job for this annotation

GitHub Actions / Build and Deploy on Node 18

Unexpected console statement
// const markerInternal = e.target;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import { createForm, createBuilder } from "../../utils";
import * as OpenStreetMapLocationStories from "./OpenStreetMapLocation.stories";

<Meta of={OpenStreetMapLocationStories} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ export const Renderer = {
});
},
}),

name: "Renderer",
};

export const Renderer2 = {
Expand Down Expand Up @@ -131,6 +129,4 @@ export const Builder = {
],
},
}),

name: "Builder",
};
4 changes: 0 additions & 4 deletions src/examples/SingleSignOn/SingleSignOn.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { Canvas, Meta, Story } from "@storybook/blocks";
import SSOHighLevel from "../../stories/assets/SSO-HighLevel.png";
import SSOUserFlow from "../../stories/assets/SSO-UserFlow.png";
import { SingleSignOn } from "./stories/SingleSignOn";
import { singleSignOnCode } from "./stories/SingleSignOn.code";
import { SSOUnauth } from "./stories/SSOUnauth.js";
import { SSOUnauthCode } from "./stories/SSOUnauth.code.js";
import * as SingleSignOnStories from "./SingleSignOn.stories";

<Meta of={SingleSignOnStories} />
Expand Down
6 changes: 3 additions & 3 deletions src/stories/WhyAndWhen.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta, Markdown } from "@storybook/addon-docs";
import { Meta } from "@storybook/addon-docs";

<Meta title="Why and When" />

Expand Down Expand Up @@ -148,7 +148,7 @@ We will use **Grab my IP** solution as an example.
</tr>
<tr>
<th>Creation</th>
<td wrapperElement={null}>
<td>
<a
href="https://api.forms.platforms.qld.gov.au/#/project/6119e1ed2943fd235a1de48b/form/611b2fc883067a20cde7a671/edit"
target="_blank"
Expand All @@ -174,7 +174,7 @@ We will use **Grab my IP** solution as an example.
<li>custom JS is added as calculated value in the textfield.</li>
</ul>
</td>
<td wrapperElement={null}>
<td>
<a
href="https://api.forms.platforms.qld.gov.au/#/project/6119e1ed2943fd235a1de48b/resource/611b2fc783067a5732e7a66f/edit"
target="_blank"
Expand Down

0 comments on commit 8350372

Please sign in to comment.