microsoft / microsoft/TypeScript

Optionally provide path/link to file with transpilation error

Offen
#32,488 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Awaiting More Feedback Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

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"
      ]
    }

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Der Payload nennt keine Quelldatei und keinen Test. Beginne damit, die Terminaldiagnose mit der gezeigten tsconfig.json zu reproduzieren und die hübsch formatierte Diagnoseausgabe des Compilers zu untersuchen. Erledigt ist die Aufgabe, wenn der angeforderte Dateipfad und die Lesbarkeit der Terminalfarben berücksichtigt sind und die resultierende Ausgabe abgedeckt ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
typescript
Bereich
accessibility, cli, compilers
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.