Skip to content

Commit 99ba8ae

Browse files
arbrandesclaude
andcommitted
fix: resolve eslint errors across runtime, shell, and tools
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cb555ff commit 99ba8ae

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ module.exports = tseslint.config(
77
{
88
extends: eslintConfig,
99
},
10+
{
11+
files: ['**/babel.config.js'],
12+
rules: {
13+
'@typescript-eslint/no-require-imports': 'off',
14+
},
15+
},
1016
{
1117
ignores: [
1218
'tools/*',

runtime/auth/AxiosJwtTokenService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export default class AxiosJwtTokenService {
6868
processAxiosErrorAndThrow(error);
6969
}
7070
} catch (error) {
71-
const userIsUnauthenticated = error.response && error.response.status === 401;
71+
const userIsUnauthenticated = error.response?.status === 401;
7272
if (userIsUnauthenticated) {
7373
// Clean up the cookie if it exists to eliminate any situation
7474
// where the cookie is not expired but the jwt is expired.

runtime/utils.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { waitFor } from '@testing-library/react';
21
import {
32
camelCaseObject,
43
convertKeyNames,

shell/header/AuthenticatedMenu.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ interface AuthenticatedMenuProps {
1313
export default function AuthenticatedMenu({ className }: AuthenticatedMenuProps) {
1414
const authenticatedUser = useAuthenticatedUser();
1515

16-
// We're using '||' on purpose to detect an empty string, so ignore eslint's warning:
17-
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
1816
const displayUserName = authenticatedUser?.name || authenticatedUser?.username;
1917

2018
const title = (

tools/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"defaultConfigPaths.ts",
1919
"eslint/**/*",
2020
"eslint.config.js",
21-
"jest.config.js"
21+
"jest.config.js",
22+
"babel.config.js"
2223
]
2324
}

tools/webpack/plugins/html-webpack-new-relic-plugin/HtmlWebpackNewRelicPlugin.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ enum OptionTypes {
1414
TRUST_KEY = 'trustKey',
1515
}
1616

17-
type HtmlWebpackNewRelicPluginOptions = {
18-
[key in OptionTypes]: string | undefined;
19-
};
17+
type HtmlWebpackNewRelicPluginOptions = Record<OptionTypes, string | undefined>;
2018

2119
export default class HtmlWebpackNewRelicPlugin {
2220
options: HtmlWebpackNewRelicPluginOptions;

0 commit comments

Comments
 (0)