2.2.2.1 release notes

 2.2.2.1

  • Even more JavaScript and TypeScript editor experience improvements - Implemented another round of strongly-typed development improvements for JavaScript and TypeScript, this time in support of not just LWC but also Aura and Salesforce Functions. Once again, these improvements are only applicable when IC2 is paired with a commercial JetBrains IDE.
    • Issue 2111 - Enhanced the Add type hint code intention to support property getter functions in addition to fields and local variables.
    • Added strong typing for this[NavigationMixin.GenerateUrl](...) which should be of type Promise<URL>.
    • Added a framework indexing handler for Aura JavaScript source files that automatically infers the data types of component, event, and helper parameters of functions in Aura controllers, renderers, and helpers. Parameter types in controllers and renderers are inferred based on the parameter index. Parameter types in helpers are inferred based on naming, specifically component and cmp for components and event and evt for events.
    • Added a framework indexing handler for JavaScript-based Salesforce Functions that automatically infers the data types of event, context, and logger parameters of the default exported function. This obviates the previous need for lengthy doc-based type hints for these parameters.
    • Added JavaScript language-level validation for Aura and LWC JavaScript source files to ensure that Aura files are treated as ES5 and LWC files are treated as ES6. This provides a significantly better JavaScript code inspection signal-to-noise ratio for those respective files. When a source file is associated with the incorrect language level, a file-level banner is displayed with quick fixes to correct the language level for the respective aura or lwc directory or to disable JavaScript language level validation for the current project.
  • Issue 482 (redux) - Added support for relationship fields as selected types in top-level queries. This also includes a new Apex code inspection, Invalid queried type, which flags invalid FROM clause relationships. This inspection includes a quick fix to add a driving SObject type qualification to the relationship to make it valid.
  • Issue 2108 - Implemented fixes for several NPEs observed in user-provided logs when displaying code coverage information. These seem to be related to the coverage framework changes introduced in the JetBrains 2022.1 release.
  • Added PMD HTML support to the PMD Salesforce code inspection. Note that PMD 6.45.0 or higher is required for HTML language support, and as the linked announcement indicates, HTML language support is still in an early state and may change in a breaking manner. I will, of course, update this integration as required to retain compatibility.
  • Added a bundled IDE-level inspection profile called Illuminated Cloud which is pre-configured for all Salesforce-related languages based on my own thoughts on which inspections provide the most useful feedback for writing higher quality code. This is therefore inherently biased but may still prove to be a useful starting point for your own inspection profile. The inspection profile includes rules for the following:
    • CSS - commercial IDEs only
    • General - parser-based syntax errors, duplicate code detection, etc.
    • HTML
    • Language injection
    • Java/JVM languages/JUnit/Maven/Properties files - for Salesforce Functions dev; IntelliJ IDEA only
    • JavaScript/TypeScript - commercial IDEs only
    • JSON
    • Markdown
    • Proofreading
    • RegExp
    • Salesforce
    • TOML
    • Velocity - commercial IDEs only
    • XML/XPath/XSLT
    • YAML
    I recommend that users not modify this inspection profile in-place and instead copy it to a project-level inspection profile that can be customized as desired and checked into version control alongside other project configuration.
  • Added validation to ensure that files under package directories configured in sfdx-project.json are also under a configured source root in the IDE. If not, a header banner is displayed with options to mark the package directory as a product or test source root, to open the source root configuration dialog, or to ignore that source root directory in future validations.
  • Added validation for a default source root that is not a configured source root. When found, the invalid source root is cleared and the standard process for selecting a default source root is executed.
  • Fixed an issue with retrieval of Territory2 child metadata.
  • Fixed an issue with deployment of Workflow child metadata.
  • Numerous other fixes and improvements.