Problem Description
When using oxlint for code inspection, the following import statement was encountered:
import React, { useEffect } from 'react';
At this point, the useEffect function has not been used in the code, and oxlint reports an error:
Identifier 'useEffect' is imported but never used.
help: Consider removing this import.
When the editor enables the "auto-fix" function for saving, oxlint will automatically delete the entire line of the imported statement when saving, which means even React is also deleted.
Expected behavior
Oxlint should only remove unused import items of useEffect, and retain the React imports that still have practical uses
Problem Description
When using oxlint for code inspection, the following import statement was encountered:
At this point, the useEffect function has not been used in the code, and oxlint reports an error:
When the editor enables the "auto-fix" function for saving, oxlint will automatically delete the entire line of the imported statement when saving, which means even React is also deleted.
Expected behavior
Oxlint should only remove unused import items of useEffect, and retain the React imports that still have practical uses