Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
40e5462
chore(NA): upgrade typescript into v5.4.5
mistic Jul 12, 2025
f497bff
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 12, 2025
7464daf
fix(NA): eslint for this version
mistic Jul 12, 2025
0594539
[CI] Auto-commit changed files from 'node scripts/notice'
kibanamachine Jul 12, 2025
edaa746
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jul 12, 2025
ba96460
fix(NA): update eslintrc file and wrongly removed app_root index
mistic Jul 13, 2025
95e42d3
fix(NA): naming conventions
mistic Jul 14, 2025
31ce5fe
chore(NA): change to previous format
mistic Jul 14, 2025
2403635
chore(NA): update app root index
mistic Jul 14, 2025
89d0a39
fix(NA): types for typescript parser
mistic Jul 14, 2025
6e5ebbb
fix(NA): kbn-eslint-plugin-imports pkg and plugin-telemetry,plugin-eui
mistic Jul 14, 2025
d060a0e
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 14, 2025
0c3aa25
fix(NA): eslint for ts
mistic Jul 14, 2025
ada11a1
chore(NA): merge and solve conflicts with main
mistic Jul 14, 2025
8f1ac41
chore(NA): merge and solve conflicts with main
mistic Jul 14, 2025
20fe45c
fix(NA): revert changes on eslint regarding ts
mistic Jul 14, 2025
88dc0fd
chore(NA): update eslint rules for new ts plugin
mistic Jul 14, 2025
1418345
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 14, 2025
c55fe1f
chore(NA): apply ts rules only into ts files
mistic Jul 14, 2025
b01f9ab
Merge branch 'upgrade-typescript-5.4.5' of github.com:mistic/kibana i…
mistic Jul 14, 2025
04d68fb
Revert "[CI] Auto-commit changed files from 'node scripts/eslint_all_…
mistic Jul 14, 2025
3cd0da7
fix(NA): overrides for osquery
mistic Jul 14, 2025
2b10844
fix(NA): enable eslint with types later
mistic Jul 14, 2025
b8970e4
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 14, 2025
e11b35d
Revert "[CI] Auto-commit changed files from 'node scripts/eslint_all_…
mistic Jul 14, 2025
d2eeb88
fix(NA): eslint configs
mistic Jul 14, 2025
6eaa932
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 14, 2025
d6d4f87
Revert "[CI] Auto-commit changed files from 'node scripts/eslint_all_…
mistic Jul 14, 2025
55e678b
fix(NA): eslint changes
mistic Jul 14, 2025
8cd7661
fix(NA): import bug
mistic Jul 15, 2025
8751951
fix(NA): eslint with types
mistic Jul 15, 2025
81c6bc3
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 15, 2025
4a79b81
fix(NA): jest resovler
mistic Jul 16, 2025
bb81884
fix(NA): all jest tests
mistic Jul 16, 2025
8adc17b
fix(NA): eslint
mistic Jul 16, 2025
a73c7d0
chore(NA): merge and solve conflicts with main
mistic Jul 16, 2025
d619140
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 16, 2025
068aae3
fix(NA): correct type import
mistic Jul 16, 2025
3baa8d6
Merge remote-tracking branch 'upstream/main' into upgrade-typescript-…
mistic Jul 17, 2025
bac96e6
chore(NA): remove changed not needed
mistic Jul 17, 2025
9082229
chore(NA): remove changed not needed
mistic Jul 17, 2025
565ac03
chore(NA): cache program files
mistic Jul 17, 2025
6d7f68a
chore(NA): include cached sourceFile
mistic Jul 17, 2025
87f12c3
fix(NA): remove unused vars
mistic Jul 17, 2025
d31dfcd
chore(NA): revert to getText again
mistic Jul 17, 2025
9d24158
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 18, 2025
042a265
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 18, 2025
170a765
chore(NA): remove tech debt todo
mistic Jul 18, 2025
632a0fb
fix(NA): eslint
mistic Jul 18, 2025
72780ab
chore(NA): merge and solve conflicts with main
mistic Jul 19, 2025
70171ea
fix(NA): lint and typecheck errors
mistic Jul 19, 2025
82150bd
fix(NA): type errors
mistic Jul 19, 2025
ebb9609
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 19, 2025
4c36814
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 21, 2025
4f8e6f4
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 22, 2025
867065a
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 23, 2025
a1e5362
Merge remote-tracking branch 'upstream/main' into upgrade-typescript-…
mistic Jul 23, 2025
73cf6d7
chore(NA): update migrations.ts
mistic Jul 24, 2025
fe58f84
chore(NA): rewrite types
mistic Jul 24, 2025
6ba482d
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 24, 2025
f3ff615
fix(NA): typecheck
mistic Jul 25, 2025
768bf5a
fix cases test typing (#22)
michaelolo24 Jul 25, 2025
30db355
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 25, 2025
daf4e78
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 25, 2025
bcf3ec0
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 25, 2025
1d55748
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 28, 2025
eeb4596
chore(NA): merge and solve conflicts with main
mistic Jul 28, 2025
24f06aa
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 29, 2025
fe5ae0f
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 29, 2025
11472fa
fix(NA): more types failures and bad handlings
mistic Jul 29, 2025
da4d96e
fix: update type assertion for results in useReduxEsSearch hook
justinkambic Jul 29, 2025
3cb311c
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 29, 2025
47aa0d6
[CI] Auto-commit changed files from 'node scripts/eslint_all_files --…
kibanamachine Jul 29, 2025
4d5cdbf
chore(NA): fix typescript errors
mistic Jul 30, 2025
f565801
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 31, 2025
3a7d32c
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 31, 2025
d04153f
Merge branch 'main' into upgrade-typescript-5.4.5
mistic Jul 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
113 changes: 82 additions & 31 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1174,13 +1174,13 @@ module.exports = {
},
{
files: [
'x-pack/solutions/observability/plugins/apm/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/apm_data_access/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/infra/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/inventory/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/metrics_data_access/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/profiling/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/profiling_data_access/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/apm/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/apm_data_access/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/infra/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/inventory/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/metrics_data_access/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/profiling/**/*.{ts,tsx}',
'x-pack/solutions/observability/plugins/profiling_data_access/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
Expand All @@ -1195,7 +1195,6 @@ module.exports = {
plugins: ['testing-library'],
rules: {
'testing-library/await-async-utils': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'import/order': [
'warn',
{
Expand All @@ -1218,8 +1217,7 @@ module.exports = {
rules: {
'import/no-nodejs-modules': 'error',
'no-duplicate-imports': 'off',
'@typescript-eslint/no-duplicate-imports': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'import/no-duplicates': 'error',
'no-restricted-imports': [
'error',
{
Expand All @@ -1230,19 +1228,28 @@ module.exports = {
],
},
},
{
files: [
'x-pack/platform/plugins/shared/automatic_import/public/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/automatic_import/common/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
},
},

/**
* ML overrides
*/
{
files: [
'x-pack/platform/plugins/shared/aiops/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/private/data_visualizer/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/private/transform/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/shared/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/packages/private/ml/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/private/file_upload/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/aiops/**/*.{ts,tsx}',
'x-pack/platform/plugins/private/data_visualizer/**/*.{ts,tsx}',
'x-pack/platform/plugins/shared/ml/**/*.{ts,tsx}',
'x-pack/platform/plugins/private/transform/**/*.{ts,tsx}',
'x-pack/platform/packages/shared/ml/**/*.{ts,tsx}',
'x-pack/platform/packages/private/ml/**/*.{ts,tsx}',
'x-pack/platform/plugins/private/file_upload/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
Expand Down Expand Up @@ -1280,7 +1287,7 @@ module.exports = {
rules: {
'import/no-nodejs-modules': 'error',
'no-duplicate-imports': 'off',
'@typescript-eslint/no-duplicate-imports': ['error'],
'import/no-duplicates': ['error'],
'no-restricted-imports': [
'error',
{
Expand Down Expand Up @@ -1466,20 +1473,20 @@ module.exports = {
'require-atomic-updates': 'error',
'symbol-description': 'error',
'vars-on-top': 'error',
'@typescript-eslint/no-duplicate-imports': ['error'],
'import/no-duplicates': ['error'],
},
overrides: [
{
files: [
'x-pack/platform/plugins/shared/cases/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/ecs_data_quality_dashboard/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/security_solution/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/security_solution_ess/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/plugins/security_solution_serverless/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/packages/data-stream-adapter/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/packages/features/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/security/packages/navigation/**/*.{js,mjs,ts,tsx}',
'src/platform/packages/shared/kbn-cell-actions/**/*.{js,mjs,ts,tsx}',
'x-pack/platform/plugins/shared/cases/**/*.{ts,tsx}',
'x-pack/solutions/security/plugins/ecs_data_quality_dashboard/**/*.{ts,tsx}',
'x-pack/solutions/security/plugins/security_solution/**/*.{ts,tsx}',
'x-pack/solutions/security/plugins/security_solution_ess/**/*.{ts,tsx}',
'x-pack/solutions/security/plugins/security_solution_serverless/**/*.{ts,tsx}',
'x-pack/solutions/security/packages/data-stream-adapter/**/*.{ts,tsx}',
'x-pack/solutions/security/packages/features/**/*.{ts,tsx}',
'x-pack/solutions/security/packages/navigation/**/*.{ts,tsx}',
'src/platform/packages/shared/kbn-cell-actions/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
Expand Down Expand Up @@ -1842,7 +1849,6 @@ module.exports = {
'src/platform/plugins/shared/saved_search/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/ban-ts-comment': [
'error',
Expand All @@ -1852,6 +1858,15 @@ module.exports = {
],
},
},
{
files: [
'src/platform/plugins/shared/discover/**/*.{ts,tsx}',
'src/platform/plugins/shared/saved_search/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
},
},

/**
* Enterprise Search overrides
Expand Down Expand Up @@ -2080,8 +2095,18 @@ module.exports = {
'prefer-arrow-callback': 'error',
'no-unused-vars': 'off',
'react/prop-types': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
{
files: ['x-pack/platform/plugins/shared/osquery/**/*.{ts,tsx}'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
},
},
{
Expand Down Expand Up @@ -2123,7 +2148,6 @@ module.exports = {
'x-pack/platform/test/spaces_api_integration/**/*.{js,mjs,ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 1,
'import/order': [
// This rule sorts import declarations
'error',
Expand Down Expand Up @@ -2163,6 +2187,33 @@ module.exports = {
],
},
},
{
files: [
'src/platform/plugins/private/interactive_setup/**/*.{ts,tsx}',
'src/platform/test/interactive_setup_api_integration/**/*.{ts,tsx}',
'src/platform/test/interactive_setup_functional/**/*.{ts,tsx}',

'packages/kbn-mock-idp-plugin/**/*.{ts,tsx}',
'src/platform/packages/private/kbn-mock-idp-utils/**/*.{ts,tsx}',
'src/platform/packages/shared/kbn-security-hardening/**/*.{ts,tsx}',
'src/platform/packages/shared/kbn-user-profile-components/**/*.{ts,tsx}',

'x-pack/platform/plugins/shared/encrypted_saved_objects/**/*.{ts,tsx}',
'x-pack/platform/test/encrypted_saved_objects_api_integration/**/*.{ts,tsx}',

'x-pack/platform/plugins/shared/security/**/*.{ts,tsx}',
'x-pack/platform/packages/private/security/**/*.{ts,tsx}',
'x-pack/platform/packages/shared/security/**/*.{ts,tsx}',
'x-pack/test/security_api_integration/**/*.{ts,tsx}',
'x-pack/test/security_functional/**/*.{ts,tsx}',

'x-pack/platform/plugins/shared/spaces/**/*.{ts,tsx}',
'x-pack/platform/test/spaces_api_integration/**/*.{ts,tsx}',
],
rules: {
'@typescript-eslint/consistent-type-imports': 1,
},
},

/**
* Do not allow `any`
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"**/@langchain/core": "^0.3.57",
"**/@langchain/google-common": "^0.1.8",
"**/@types/node": "22.15.3",
"**/@typescript-eslint/utils": "5.62.0",
"**/@typescript-eslint/utils": "8.16.0",
"**/chokidar": "^3.5.3",
"**/d3-scale/**/d3-color": "npm:@elastic/kibana-d3-color@2.0.1",
"**/globule/minimatch": "^3.1.2",
Expand All @@ -92,7 +92,7 @@
"**/langchain": "^0.3.15",
"**/remark-parse/trim": "1.0.1",
"**/sharp": "0.32.6",
"**/typescript": "5.1.6",
"**/typescript": "5.4.5",
"**/util": "^0.12.5",
"**/yauzl": "^3.2.0",
"@aws-sdk/client-bedrock-agent-runtime": "^3.744.0",
Expand Down Expand Up @@ -1802,9 +1802,9 @@
"@types/yargs": "^15.0.0",
"@types/yauzl": "^2.10.3",
"@types/yazl": "^2.4.2",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"@typescript-eslint/typescript-estree": "^5.62.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"@typescript-eslint/typescript-estree": "^8.16.0",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"@yarnpkg/lockfile": "^1.1.0",
"aggregate-error": "^3.1.0",
Expand Down Expand Up @@ -1980,7 +1980,7 @@
"tree-kill": "^1.2.2",
"ts-morph": "^15.1.0",
"tsd": "^0.32.0",
"typescript": "5.1.6",
"typescript": "5.4.5",
"val-loader": "^6.0.0",
"vinyl-fs": "^4.0.0",
"watchpack": "^1.6.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-docs-utils/src/count_eslint_disable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('countEslintDisableLines', () => {
expect(counts).toMatchInlineSnapshot(`
Object {
"eslintDisableFileCount": 3,
"eslintDisableLineCount": 8,
"eslintDisableLineCount": 9,
}
`);
});
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-docs-utils/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export enum TypeKind {
* Maps to the typescript syntax kind `TypeReferences`. For example,
* export type FooFn = () => string will be a TypeKind, not a FunctionKind.
*/
// eslint-disable-next-line @typescript-eslint/no-shadow
TypeKind = 'Type',
/**
* Uncategorized is used if a type is encountered that isn't handled.
Expand Down
39 changes: 13 additions & 26 deletions packages/kbn-eslint-config/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,43 +55,30 @@ module.exports = {
//
// Old recommended tslint rules
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': [
'error',
{ default: 'array-simple', readonly: 'array-simple' },
],
'@typescript-eslint/ban-types': [
'@typescript-eslint/array-type': 'off',
// ##
// Replacing old @typescript-eslint/ban-types
'@typescript-eslint/no-restricted-types': [
'error',
{
types: {
SFC: {
message: 'Use FC or FunctionComponent instead.',
fixWith: 'FC',
},
'React.SFC': {
message: 'Use FC or FunctionComponent instead.',
fixWith: 'React.FC',
},
StatelessComponent: {
message: 'Use FunctionComponent instead.',
fixWith: 'FunctionComponent',
},
'React.StatelessComponent': {
message: 'Use FunctionComponent instead.',
fixWith: 'React.FunctionComponent',
},
// used in the codebase in the wild
'{}': false,
object: false,
Function: false,
SFC: 'Use FC or FunctionComponent instead.',
'React.SFC': 'Use React.FC instead.',
StatelessComponent: 'Use FunctionComponent instead.',
'React.StatelessComponent': 'Use React.FunctionComponent instead.',
},
},
],
'@typescript-eslint/no-unsafe-function-type': 'off',
'@typescript-eslint/no-wrapper-object-types': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
// ##
camelcase: 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
format: ['camelCase'],
format: ['camelCase', 'PascalCase', 'UPPER_CASE', 'snake_case'],
filter: {
regex: allowedNameRegexp,
match: false,
Expand Down
21 changes: 12 additions & 9 deletions packages/kbn-eslint-plugin-eslint/rules/no_export_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

const Fs = require('fs');
const fs = require('fs');
const ts = require('typescript');
const { getExportCode, getExportNamedNamespaceCode } = require('../helpers/codegen');
const tsEstree = require('@typescript-eslint/typescript-estree');

const { getExportNamesDeep } = require('../helpers/exports');

Expand All @@ -25,6 +24,8 @@ const { getExportNamesDeep } = require('../helpers/exports');
const ERROR_MSG =
'`export *` is not allowed in the index files of plugins to prevent accidentally exporting too many APIs';

const sourceFileCache = new Map();

/** @type {Rule} */
module.exports = {
meta: {
Expand All @@ -40,13 +41,15 @@ module.exports = {

/** @type Parser */
const parser = (path) => {
const code = Fs.readFileSync(path, 'utf-8');
const result = tsEstree.parseAndGenerateServices(code, {
...context.parserOptions,
comment: false,
filePath: path,
});
return result.services.program.getSourceFile(path);
if (sourceFileCache.has(path)) {
return sourceFileCache.get(path);
}

const code = fs.readFileSync(path, 'utf-8');
const sourceFile = ts.createSourceFile(path, code, ts.ScriptTarget.ESNext, true);

sourceFileCache.set(path, sourceFile);
return sourceFile;
};

const exportSet = getExportNamesDeep(parser, context.getFilename(), tsnode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { TSESTree } from '@typescript-eslint/typescript-estree';
/*
Attempts to get a string representation of the intent
out of an array of nodes.

Currently supported node types in the array:
* String literal text (JSXText)
* Translated text via <FormattedMessage> component -> uses prop `defaultMessage`
* Translated text via {i18n.translate} call -> uses passed options object key `defaultMessage`
* Translated text via {i18n.translate} call -> uses passed options object key `defaultMessage`
*/
export function getIntentFromNode(originalNode: TSESTree.JSXOpeningElement): string {
if (!originalNode.parent) return '';
Expand Down Expand Up @@ -79,7 +79,8 @@ export function getIntentFromNode(originalNode: TSESTree.JSXOpeningElement): str
}

const args: TSESTree.CallExpressionArgument[] = expression.arguments;
const callee: TSESTree.LeftHandSideExpression = expression.callee;
const callee: TSESTree.LeftHandSideExpression =
expression.callee as TSESTree.LeftHandSideExpression;

if (!('object' in callee)) {
return '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('getPropValues', () => {
} as any),
} as any,
})
).toEqual({
).toMatchObject({
prop1: { type: 'Literal', value: 'bar', raw: '"bar"' },
prop2: element.openingElement.attributes[1].value,
});
Expand Down
Loading
Loading