Skip to content

Commit

Permalink
Merge pull request #7126 from pjonsson/unused-consts
Browse files Browse the repository at this point in the history
Remove unused variables
  • Loading branch information
na9da authored Jun 26, 2024
2 parents 37419b5 + 5128e81 commit 87b57b0
Show file tree
Hide file tree
Showing 12 changed files with 3 additions and 82 deletions.
67 changes: 0 additions & 67 deletions buildprocess/directory-loader.js

This file was deleted.

2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ gulp.task("lint", function (done) {
"--ignore-pattern",
"lib/ThirdParty",
"--max-warnings",
"264" // TODO: Bring this back to 0
"238" // TODO: Bring this back to 0
]);

done();
Expand Down
1 change: 0 additions & 1 deletion lib/Map/ColorMap/EnumColorMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default class EnumColorMap extends ColorMap {
}

const values = this.values;
let i, len;
for (let i = 0, len = values.length; i < len; ++i) {
if (values[i] === value) {
return this.colors[i];
Expand Down
2 changes: 0 additions & 2 deletions lib/Map/Leaflet/LeafletVisualizer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,6 @@ function getDashArray(
material: PolylineDashMaterialProperty,
time: JulianDate
): number[] {
let dashArray;

const dashPattern = material.dashPattern
? material.dashPattern.getValue(time)
: undefined;
Expand Down
2 changes: 0 additions & 2 deletions lib/Models/Catalog/Ckan/CkanCatalogGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ export class CkanServerStratum extends LoadableStratum(CkanCatalogGroupTraits) {
static async load(
catalogGroup: CkanCatalogGroup
): Promise<CkanServerStratum | undefined> {
const terria = catalogGroup.terria;

let ckanServerResponse: CkanServerResponse | undefined = undefined;

// Each item in the array causes an independent request to the CKAN, and the results are concatenated
Expand Down
1 change: 0 additions & 1 deletion lib/Models/Catalog/Ckan/CkanItemReference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ export function isResourceInSupportedFormats(
formats: PreparedSupportedFormat[]
): PreparedSupportedFormat | undefined {
if (resource === undefined) return undefined;
const matches: PreparedSupportedFormat[] = [];
for (let i = 0; i < formats.length; ++i) {
const format = formats[i];
if (resourceIsSupported(resource, format)) return format;
Expand Down
1 change: 0 additions & 1 deletion lib/Models/Catalog/Esri/ArcGisCatalogGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class ArcGisServerStratum extends LoadableStratum(ArcGisCatalogGroupTraits) {
static async load(
catalogGroup: ArcGisCatalogGroup
): Promise<ArcGisServerStratum> {
const terria = catalogGroup.terria;
const uri = new URI(catalogGroup.url).addQuery("f", "json");
return loadJson(proxyCatalogItemUrl(catalogGroup, uri.toString()))
.then((arcgisServer: ArcGisServer) => {
Expand Down
1 change: 0 additions & 1 deletion lib/Models/Catalog/Esri/ArcGisFeatureServerCatalogGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export class FeatureServerStratum extends LoadableStratum(
static async load(
catalogGroup: ArcGisFeatureServerCatalogGroup | ArcGisCatalogGroup
): Promise<FeatureServerStratum> {
const terria = catalogGroup.terria;
const uri = new URI(catalogGroup.url).addQuery("f", "json");

return loadJson(proxyCatalogItemUrl(catalogGroup, uri.toString()))
Expand Down
2 changes: 0 additions & 2 deletions lib/Models/Catalog/Esri/ArcGisPortalCatalogGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ export class ArcGisPortalStratum extends LoadableStratum(
static async load(
catalogGroup: ArcGisPortalCatalogGroup
): Promise<ArcGisPortalStratum | undefined> {
const terria = catalogGroup.terria;

let portalGroupsServerResponse:
| ArcGisPortalGroupSearchResponse
| undefined = undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ const StandardUserInterfaceBase: React.FC<StandardUserInterfaceProps> =
props.children
);

const terria = props.terria;

const showStoryBuilder =
props.viewState.storyBuilderShown &&
!props.viewState.useSmallScreenInterface;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const DisplayAsPercentSection: React.FC<IDisplayAsPercentSection> = (
props: IDisplayAsPercentSection
) => {
const { t } = useTranslation();
const theme = useTheme();
useTheme();
const togglePercentage = () => {
props.item.displayPercent = !props.item.displayPercent;
};
Expand Down
2 changes: 1 addition & 1 deletion lib/Styled/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const StyledInput = styled.input<InputProps>`

const Input: React.FC<InputProps> = (props: InputProps) => {
const { boxProps, ...rest }: InputProps = props;
const theme: DefaultTheme = useTheme();
useTheme();
return (
<Box fullWidth {...boxProps}>
<StyledInput {...rest} />
Expand Down

0 comments on commit 87b57b0

Please sign in to comment.