microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.31k stars 12.53k forks source link

Optionally provide path/link to file with transpilation error #32488

Open ORESoftware opened 5 years ago

ORESoftware commented 5 years ago

I see this in my terminal:

Screen Shot 2019-07-19 at 1 04 27 PM


I have two feature requests:

  1. for us hard of seeing people, it's really hard to read the cyan and yellow color in a light terminal. Is there some way to turn on darker colors - by passing a dark/light option to pretty?

  2. It would be awesome if the transpiler could include the path to the file in the terminal. My editor is cool and if I click the file path in the terminal it will open the file.

My tsconfig.json is:


    {
      "compilerOptions": {
        "outDir": "dist",
        "allowJs": false,
        "pretty": true,   // << makes it pretty, but I can't read in a light-colored terminal
        "resolveJsonModule": true,
        "sourceMap": false,
        "skipLibCheck": true,
        "rootDir": "src",
        "declaration": false,
        "baseUrl": ".",
        "target": "es2018",
        "module": "commonjs",
        "noImplicitAny": true,
        "removeComments": true,
        "allowUnreachableCode": true,
        "lib": [
          "es2017",
          "es2018"
        ]
      },
      "compileOnSave": false,
      "include": [
        "src"
      ]
    }
RyanCavanaugh commented 5 years ago

The path is right there in the error message?

ORESoftware commented 5 years ago

yeah, maybe webstorm/intellij can only work with an absolute path. but the color thing I suppose is more important, I assume jetbrains products could be made to interpret the relative path.