1+ /* eslint-disable @typescript-eslint/no-explicit-any */
2+ /** TODO: tighten types when time allows. */
3+
14import { ProjectImporter } from '@ds-wizard/plugin-sdk/project-importer'
25
36const KEY_ENTITIES = 'entities'
@@ -82,7 +85,7 @@ export default class RepliesImporter {
8285 }
8386 }
8487
85- importQuestionValue ( phase : number , path : string [ ] , newPath : string [ ] , question : any ) {
88+ importQuestionValue ( phase : number , path : string [ ] , newPath : string [ ] ) {
8689 if ( phase === 1 ) {
8790 const reply = this . extractReply ( path )
8891 if ( reply !== undefined ) {
@@ -91,7 +94,7 @@ export default class RepliesImporter {
9194 }
9295 }
9396
94- importQuestionIntegration ( phase : number , path : string [ ] , newPath : string [ ] , question : any ) {
97+ importQuestionIntegration ( phase : number , path : string [ ] , newPath : string [ ] ) {
9598 if ( phase === 1 ) {
9699 const reply = this . extractReply ( path )
97100 if ( reply !== undefined ) {
@@ -120,7 +123,7 @@ export default class RepliesImporter {
120123 } )
121124 }
122125
123- importQuestionMultiChoice ( phase : number , path : string [ ] , newPath : string [ ] , question : any ) {
126+ importQuestionMultiChoice ( phase : number , path : string [ ] , newPath : string [ ] ) {
124127 if ( phase === 1 ) {
125128 const reply = this . extractReply ( path )
126129 if ( reply !== undefined ) {
@@ -129,7 +132,7 @@ export default class RepliesImporter {
129132 }
130133 }
131134
132- importQuestionItemSelect ( phase : number , path : string [ ] , newPath : string [ ] , question : any ) {
135+ importQuestionItemSelect ( phase : number , path : string [ ] , newPath : string [ ] ) {
133136 if ( phase === 2 ) {
134137 const reply = this . extractReply ( path )
135138 if ( reply !== undefined ) {
@@ -157,12 +160,7 @@ export default class RepliesImporter {
157160 )
158161 break
159162 case 'ValueQuestion' :
160- this . importQuestionValue (
161- phase ,
162- [ ...path , questionUuid ] ,
163- [ ...newPath , questionUuid ] ,
164- question ,
165- )
163+ this . importQuestionValue ( phase , [ ...path , questionUuid ] , [ ...newPath , questionUuid ] )
166164 break
167165 case 'ListQuestion' :
168166 this . importQuestionList (
@@ -177,23 +175,20 @@ export default class RepliesImporter {
177175 phase ,
178176 [ ...path , questionUuid ] ,
179177 [ ...newPath , questionUuid ] ,
180- question ,
181178 )
182179 break
183180 case 'MultiChoiceQuestion' :
184181 this . importQuestionMultiChoice (
185182 phase ,
186183 [ ...path , questionUuid ] ,
187184 [ ...newPath , questionUuid ] ,
188- question ,
189185 )
190186 break
191187 case 'ItemSelectQuestion' :
192188 this . importQuestionItemSelect (
193189 phase ,
194190 [ ...path , questionUuid ] ,
195191 [ ...newPath , questionUuid ] ,
196- question ,
197192 )
198193 break
199194 }
@@ -230,7 +225,7 @@ export default class RepliesImporter {
230225 return true
231226 }
232227 this . error = `Unsupported metamodel version: ${ metamodelVersion } `
233- } catch ( e ) {
228+ } catch {
234229 this . error = 'Unknown metamodel version (wrong JSON file).'
235230 }
236231 return false
0 commit comments