Skip to content

Won't transform class with actions hash #536

@DArrigoni

Description

@DArrigoni

Ember Objects with objects or arrays as direct properties (actions and queryParams are the exception). See eslint-plugin-ember/avoid-leaking-state-in-ember-objects for more details.

I have a file with an actions hash that is kicking out this error:

2023-06-20T15:50:48.604Z ERROR: [app/controllers/authenticated/customers/index.js]
	RuntimeDataError: Could not find runtime data
2023-06-20T15:50:48.613Z ERROR: [app/controllers/authenticated/customers/index.js]
	ValidationError: Validation errors for class 'Index':
		[actions]: Transform not supported - value is of type object. For more details: eslint-plugin-ember/avoid-leaking-state-in-ember-objects

I'm assuming that the issue is something that fixing the "Could not find runtime data" error would resolve, although it works fine if I remove the actions hash and run it without it.

I'm invoking it with: npx ember-native-class-codemod http://localhost:4202/partner/ app/controllers/authenticated/customers/index.js

And I can verify the app is loaded at http://localhost:4202/partner/

Build successful (2925ms) – Serving on http://localhost:4202/partner/

Slowest Nodes (totalTime >= 5%)                               | Total (avg)
--------------------------------------------------------------+----------------
AssetRewrite (2)                                              | 1376ms (688 ms)
SassCompiler (1)                                              | 699ms
Packaged Application Javascript (1)                           | 147ms

Any assistance would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions