Next.js Discord

Discord Forum

import statement for CareerSection is getting deleted by itself when you're trying to save

Answered
Giant panda posted this in #help-forum
Open in Discord
Avatar
Giant pandaOP
Hello , i was trying to put

import CareerSection from '@/components/templates/CareerSection';
or
import CareerSection from '../components/templates/CareerSection';

After saving it , it just deleted itself.
Image
Answered by Giant panda
I fixed it myself by editing eslint file that causing autosave issue.
View full answer

3 Replies

Avatar
IIRC it's eslint issue, which removes unused imports. Use the imported component somewhere before saving the file, you should be fine.

or maybe you are using some vscode extension, cause last I checked eslint doesn't have this rule built-in. either an eslint package, or vscode extension.
Avatar
Giant pandaOP
Be specific please
Avatar
Giant pandaOP
I fixed it myself by editing eslint file that causing autosave issue.
Answer