Skip to content

Conversation

@namrata111f
Copy link
Contributor

No description provided.

@namrata111f namrata111f changed the title NEW @W-20502236@ Adding changes to support react in .jsx files for single react plugin [Inital PR to review the LLD] NEW @W-20597715@ Adding changes to support react in .jsx files for single react plugin [Inital PR to review the LLD] Dec 29, 2025
Comment on lines +146 to +147
// Note: disable_react_base_config is intentionally excluded - React support is gated
// TODO: Add 'disable_react_base_config' when React support is released
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can you actually test this then?

Shouldn't you then use the
addKeysThatBypassValidation
method then so that this key (when attempting to use it internally) doesn't throw an error by this check? See https://github.com/forcedotcom/code-analyzer-core/blob/dev/packages/code-analyzer-core/src/config.ts#L145C25-L145C52 for example.

Comment on lines +68 to +77
// Deep clone the languageOptions to avoid mutating the original shared config from the LWC package
const originalParserOptions = configs[0].languageOptions!.parserOptions as Linter.ParserOptions;
const clonedBabelOptions = JSON.parse(JSON.stringify(originalParserOptions.babelOptions));
configs[0].languageOptions = {
...configs[0].languageOptions,
parserOptions: {
...originalParserOptions,
babelOptions: clonedBabelOptions
}
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't be needing to do any cloning. Simply reconstruct and override using the {...someObj, someField: { ...someObj.someField, someSubField: xyz }} trick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants