Skip to main content

BaseMigrationTask

BaseMigrationTask

Creates a new instance of a BaseMigrationTask.

Kind: global class

new BaseMigrationTask(migrationName, pluginName, context)

Creates a new instance of a migration Task.

ParamDescription
migrationNameThe short name of the migration. Used to format result messages.
pluginNameThe name of the plugin this task is included in.
contextThe runtime task context passed to the Task.

baseMigrationTask.featureNames

A list of feature names that represent this migration.

Kind: instance property of BaseMigrationTask
Read only: true

baseMigrationTask.addRuleComponentMetadata()

Adds componennt data to the rule metadata.

Kind: instance method of BaseMigrationTask

baseMigrationTask.addFeature(featureId, feature)

Adds a feature definition to the Checkup rule metadata. Used for correctly associating features and results.

Kind: instance method of BaseMigrationTask

ParamDescription
featureIdThe ID of the feature, such as the lint rule ID corresponding to the feature
featureAn object representing the feature's details
feature.featureThe name of the feature
feature.messageThe user-friendly message
feature.helpUriA URL to provide help documentation about the feature

baseMigrationTask.addFeatureResult(feature, options)

Adds a feature-specific result object to the Checkup output. The result includes the feature metadata that this result is associated with in the migration.

Kind: instance method of BaseMigrationTask

ParamDescription
featureAn object representing the feature's details
feature.featureThe name of the feature
feature.messageThe user-friendly message
feature.helpUriA URL to provide help documentation about the feature
optionsAdditional options to pass to the result
options.locationSpecifies a location where the result occurred
options.propertiesA property bag named properties, which stores additional values on the result