Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve TypeScript typings path for SCSS imports #38

Closed
charliegdev opened this issue May 27, 2019 · 2 comments · Fixed by #45
Closed

Solve TypeScript typings path for SCSS imports #38

charliegdev opened this issue May 27, 2019 · 2 comments · Fixed by #45
Assignees
Labels
bug Something isn't working
Projects
Milestone

Comments

@charliegdev
Copy link
Owner

Right now, if I open any .jsx files that imports .scss files, such as:

  • Task.jsx
  • Tasks.jsx

The SCSS import triggers a TypeScript warning:

scss

What's funny about this, is that as long as I have another typing file opened in VSCode (typings/declarations.d.ts), this error won't show.

typings/declarations.d.ts contains a hack to disable this SCSS import warning:

declare module "*.scss" {
  const content: any;
  export default content;
}

So, it seems VS Code has trouble figuring out the correct location for typing files, and this may be an easy config issue to fix.

Timebox to 2 hours.

@charliegdev charliegdev self-assigned this May 27, 2019
@charliegdev charliegdev added the bug Something isn't working label May 27, 2019
@charliegdev charliegdev added this to To do in Sprint 1 via automation May 27, 2019
@charliegdev charliegdev added this to the MVP milestone May 27, 2019
@charliegdev charliegdev moved this from To do to In progress in Sprint 1 May 27, 2019
@charliegdev charliegdev moved this from In progress to Done in Sprint 1 May 27, 2019
@charliegdev charliegdev moved this from Done to In progress in Sprint 1 May 28, 2019
@charliegdev
Copy link
Owner Author

Moving this back to In Progress since this is happening again. The previous solution doesn't work, and I'll probably need to generate type files for .scss.

@charliegdev
Copy link
Owner Author

Solved in PR #45

Sprint 1 automation moved this from In progress to Done May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Sprint 1
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant