Is there a way to prevent coc-fix-current from importing React?
I'm trying to use coc-fix-current to import the component under the cursor. Unfortunately, it's importing React instead:
import React from 'react';
If I then run coc-fix-current again, it'll import the component under the cursor.
The problem is that I'm using React 17, and it's no longer necessary to import React (unless you're explicitly using it). In fact, after it's imported, it's immediately flagged as an unused import.
I'd like for it to be smarter about this, skip the React import step, and import the component on the first attempt.
Is there a way to prevent
coc-fix-current
from importingReact
?I'm trying to use
coc-fix-current
to import the component under the cursor. Unfortunately, it's importing React instead:If I then run
coc-fix-current
again, it'll import the component under the cursor.The problem is that I'm using React 17, and it's no longer necessary to import React (unless you're explicitly using it). In fact, after it's imported, it's immediately flagged as an unused import.
I'd like for it to be smarter about this, skip the React import step, and import the component on the first attempt.