Skip to content

Lots of errors produced in WebStorm IDE with this plugin #97

@ekilah

Description

@ekilah

Describe the bug
When including this plugin in my tsconfig.json, the Intellij WebStorm IDE reports hundreds of errors that look like this:
Error:(54, 33) TS1155: 'const' declarations must be initialized.
image

When I remove this plugin, these errors go away.

To Reproduce
Steps to reproduce the behavior:
Use WebStorm in a project with this plugin. My tsconfig using ts 3.9.5:

{
  "compilerOptions": {
    "outDir": "build/dist",
    "module": "esnext",
    "target": "es5",
    "lib": ["es6", "dom"],
    "sourceMap": true,
    "allowJs": true,
    "jsx": "react",
    "moduleResolution": "node",
    "baseUrl": ".",
    "rootDir": ".",
    "allowSyntheticDefaultImports": true,
    "esModuleInterop": true,
    "paths": {
      "~/*": ["src/*"]
    },
    "importsNotUsedAsValues": "preserve",
    "forceConsistentCasingInFileNames": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "suppressImplicitAnyIndexErrors": true,
    "noUnusedLocals": true,
    "isolatedModules": true,
    "plugins": [
      {
        "name": "typescript-plugin-css-modules",
        "options": {
          "customMatcher": "\\.css$"
        }
      }
    ]
  },
  "exclude": [
    "./node_modules",
    "build",
    "scripts",
    "acceptance-tests",
    "webpack",
    "src/setupTests.ts"
  ]
}

The TypeScript window in the IDE will call the TS service and find errors for you.

Expected behavior
These errors wouldn't show up.

Screenshots
see above.

another very simple example:

image
image

Desktop (please complete the following information):

  • OS: Mac OSX Catalina

Additional context
We use CSS modules and some PostCSS features, though these errors seem to pop up in files that don't do anything fancy like PostCSS's nesting, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions