Skip to content

Bug report: FN016004_TS_property_pane_property_import suggests empty import #1484

@waldekmastykarz

Description

@waldekmastykarz

Description

The FN016004_TS_property_pane_property_import spfx project upgrade rule suggest and empty import.

import {  } from "@microsoft/sp-webpart-base";
import { IPropertyPaneField, PropertyPaneFieldType } from "@microsoft/sp-property-pane";

Steps to reproduce

  • create a project using SPFx v1.6
  • create a .ts file with the following import:
import {
  IPropertyPaneField,
  PropertyPaneFieldType
} from '@microsoft/sp-webpart-base';
  • upgrade the project to v1.10

Expected result

import { IPropertyPaneField, PropertyPaneFieldType } from "@microsoft/sp-property-pane";

Actual result

import {  } from "@microsoft/sp-webpart-base";
import { IPropertyPaneField, PropertyPaneFieldType } from "@microsoft/sp-property-pane";

Environment

CLI v2.9

Additional info

Another repro case is the following snippet:

import { IPropertyPaneCustomFieldProps } from '@microsoft/sp-webpart-base';

which becomes:

import {  } from "@microsoft/sp-webpart-base";
import { IPropertyPaneCustomFieldProps, PropertyPaneCustomField } from "@microsoft/sp-property-pane";

Bugs:

  • empty import
  • extra PropertyPaneCustomField added in the second case that's not used anywhere in code

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions