= ({
const textPadding = (textPane * 3240) / 3;
const playerName = usePlayerName();
- let identifiers = `${TRIPTYCH_VERSION} ${playerName ? playerName : ""}`;
+ const identifiers = `${TRIPTYCH_VERSION} ${playerName ? playerName : ""}`;
return (
diff --git a/assets/src/components/v2/triptych/viewport.tsx b/assets/src/components/v2/triptych/viewport.tsx
index cec2966a2..7ee1c26c1 100644
--- a/assets/src/components/v2/triptych/viewport.tsx
+++ b/assets/src/components/v2/triptych/viewport.tsx
@@ -8,7 +8,7 @@ import { getTriptychPane } from "Util/outfront";
* If the param is missing, this will show the full
* screen content (3240px x 1920px).
*/
-const Viewport: React.ComponentType<{}> = ({ children }) => {
+const Viewport: React.ComponentType = ({ children }) => {
let viewportClassName = "triptych-screen-viewport";
let shifterClassName = "triptych-shifter";
diff --git a/assets/src/hooks/use_api_response.tsx b/assets/src/hooks/use_api_response.tsx
index b40945afb..12bfafbfc 100644
--- a/assets/src/hooks/use_api_response.tsx
+++ b/assets/src/hooks/use_api_response.tsx
@@ -115,7 +115,7 @@ const useApiResponse = ({
json,
);
}
- } catch (err) {
+ } catch {
doFailureBuffer(lastSuccess, failureModeElapsedMs, setApiResponse);
}
};
diff --git a/assets/src/hooks/v2/use_api_response.tsx b/assets/src/hooks/v2/use_api_response.tsx
index e6ea5b71e..96e239569 100644
--- a/assets/src/hooks/v2/use_api_response.tsx
+++ b/assets/src/hooks/v2/use_api_response.tsx
@@ -148,7 +148,7 @@ const getOutfrontAbsolutePath = () =>
isOFM() ? "https://screens.mbta.com" : "";
const getRoute = () => {
- let route = "/v2/api/screen/";
+ const route = "/v2/api/screen/";
const isPending = getDatasetValue("isPending") === "true";
return isPending ? `${route}pending/` : route;
};
@@ -223,7 +223,7 @@ const useBaseApiResponse = ({
});
setLastSuccess(now);
}
- } catch (err) {
+ } catch {
doFailureBuffer(lastSuccess, setApiResponse);
}
diff --git a/assets/src/util/outfront.tsx b/assets/src/util/outfront.tsx
index 5f98fe769..08cb21a98 100644
--- a/assets/src/util/outfront.tsx
+++ b/assets/src/util/outfront.tsx
@@ -57,7 +57,7 @@ export const getPlayerName = (): string | null => {
const deviceInfoJSON = mraid.getDeviceInfo();
const deviceInfo = JSON.parse(deviceInfoJSON);
playerName = deviceInfo.deviceName;
- } catch (err) {}
+ } catch {}
}
return playerName;
@@ -99,14 +99,13 @@ const getTriptychPaneFromTags = () => {
* Returns null if we fail to determine the station name for any reason.
*/
export const getStationName = (): string | null => {
- let station = null;
-
const tags = getTags();
+
if (tags != null) {
return tags.find(({ name }) => name === "Station")?.value?.[0] ?? null;
}
- return station;
+ return null;
};
const getTags = (): OFMTag[] | null => {
@@ -116,7 +115,7 @@ const getTags = (): OFMTag[] | null => {
if (mraid) {
try {
tags = JSON.parse(mraid.getTags()).tags as OFMTag[];
- } catch (err) {}
+ } catch {}
}
return tags;
@@ -183,7 +182,7 @@ export const __TEST_setFakeMRAID__ = (options: {
}) => {
const { playerName, station, triptychPane } = options;
- let tags: OFMTag[] = [{ name: "Station", value: [station] }];
+ const tags: OFMTag[] = [{ name: "Station", value: [station] }];
if (triptychPane) {
tags.push({
name: "Array_configuration",
diff --git a/assets/tslint.json b/assets/tslint.json
deleted file mode 100644
index 8978a8421..000000000
--- a/assets/tslint.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "defaultSeverity": "error",
- "extends": ["tslint:recommended", "tslint-config-prettier"],
- "jsRules": {},
- "rules": {
- "interface-name": [true, "never-prefix"],
- "jsx-no-lambda": false,
- "object-literal-sort-keys": { "options": "match-declaration-order-only" },
- "variable-name": [
- true,
- "ban-keywords",
- "check-format",
- "allow-leading-underscore",
- "require-const-for-all-caps",
- "allow-pascal-case"
- ]
- },
- "rulesDirectory": []
-}
diff --git a/assets/webpack.config.js b/assets/webpack.config.js
index f475a159f..b0c25dac6 100644
--- a/assets/webpack.config.js
+++ b/assets/webpack.config.js
@@ -1,11 +1,13 @@
+/* eslint-disable @typescript-eslint/no-var-requires */
+/* global require, module, __dirname */
+
const path = require("path");
-const glob = require("glob");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const TerserPlugin = require("terser-webpack-plugin");
const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
-module.exports = (env, options) => ({
+module.exports = () => ({
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx"],
alias: {