Skip to content

Commit 7be4b26

Browse files
arbrandesclaude
andcommitted
fix: resolve eslint errors
Regenerate package-lock and fix resulting linting errors. This includes disabling the prefer-optional-chain rule in the base config. Also fix IDE type checking under tools/ by adding babel.config.js to the tsconfig include list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 94d85fc commit 7be4b26

7 files changed

Lines changed: 1998 additions & 1380 deletions

File tree

package-lock.json

Lines changed: 1987 additions & 1340 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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 = (

test-site/package-lock.json

Lines changed: 4 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/eslint/base.eslint.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ module.exports = tseslint.config(
8888
}],
8989
'@typescript-eslint/no-empty-function': 'off',
9090
'@typescript-eslint/prefer-nullish-coalescing': 'off',
91+
'@typescript-eslint/prefer-optional-chain': 'off',
9192
'@stylistic/semi': ['error', 'always', { omitLastInOneLineBlock: true, omitLastInOneLineClassBody: true }],
9293
'@stylistic/quotes': ['error', 'single', {
9394
avoidEscape: true,
@@ -113,9 +114,9 @@ module.exports = tseslint.config(
113114
},
114115
{
115116
files: [
116-
'babel.config.js',
117-
'jest.config.js',
118-
'eslint.config.js'
117+
'**/babel.config.js',
118+
'**/jest.config.js',
119+
'**/eslint.config.js'
119120
],
120121
rules: {
121122
'@typescript-eslint/no-require-imports': 'off'

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)