Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to replace /// with import?

If you use create-react-app a file named react-app-env.d.ts is created, that contains /// <reference types="react-scripts" />. I was completely redoing Eslint config that comes with create-react-app and while doing so, I have got an error saying:

Do not use a triple slash reference for react-scripts, use import style instead @typescript-eslint/triple-slash-reference

My question is, how do I replace /// <reference types="react-scripts" /> with import?

like image 240
MalwareMoon Avatar asked Jun 18 '26 09:06

MalwareMoon


1 Answers

You can replace it with import 'react-scripts' to fix this error.

like image 100
Sumit Jadhav Avatar answered Jun 19 '26 23:06

Sumit Jadhav