microsoft / microsoft/TypeScript-Sublime-Plugin

Sublime complaining while VSCode is not?

Open
#782 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.7k
Forks
236
Avg merge
21d 13h
Merged PRs (30d)
1

Description

This may well be user error, but I'm seeing error messages appear only in SublimeText such as:

Module '"/home/ian/src/monorep/node_modules/@types/react/index"' can only be default-imported using the 'allowSyntheticDefaultImports' flag

The code itself is relatively straight forward:

import React from 'react';

import { Button } from '.';

export default {
  title: 'Button',
  argTypes: { onClick: { action: 'clicked' } },
};

const Template = (args) => <Button onClick={args.onClick} />;

export const Default = Template.bind({});

The same code is fine within VSCode and does not show an issue.

You can see the file here https://github.com/IPWright83/monorep/blob/ts-bug/packages/components/src/components/Button/Button.stories.tsx
You can access a reproduction by cloning https://github.com/IPWright83/monorep and switching to the ts-bug branch and opening that file.

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Clone the linked monorep reproduction, switch to the ts-bug branch, and open packages/components/src/components/Button/Button.stories.tsx. Compare the diagnostic shown in SublimeText with VSCode for this file and trace why they differ; done means the discrepancy is resolved or its cause is documented with a reproducible result.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.