Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Output prose format other than documented #4515

Closed
e2fletcher opened this issue Feb 11, 2019 · 5 comments · Fixed by #4656
Closed

Output prose format other than documented #4515

e2fletcher opened this issue Feb 11, 2019 · 5 comments · Fixed by #4656

Comments

@e2fletcher
Copy link

e2fletcher commented Feb 11, 2019

Bug Report

  • TSLint version: 5.12.1
  • TypeScript version: 3.3.3
  • Running TSLint via: CLI

Apparently the output format has changed.
Is it intentional?
If so, it has not been changed in the documentation.
https://palantir.github.io/tslint/formatters/prose/

with tslint.json configuration:

{
    "defaultSeverity": "warning",
    "extends": [
        "tslint:recommended"
    ],
    "jsRules": {},
    "rules": {},
    "rulesDirectory": []
}

Actual behavior

➜  test-tslint tslint --project tsconfig.json -t prose

WARNING: /home/ender/workspace/test-tslint/test.ts:3:13 - Missing semicolon
WARNING: /home/ender/workspace/test-tslint/test.ts:5:1 - Calls to 'console.log' are not allowed.

Expected behavior

➜  test-tslint tslint --project tsconfig.json -t prose
WARNING: /home/ender/workspace/test-tslint/test.ts[3,13]: Missing semicolon
WARNING: /home/ender/workspace/test-tslint/test.ts[5,1]: Calls to 'console.log' are not allowed.
@JoshuaKGoldberg
Copy link
Contributor

Yup, this was changed in #4222 following discussion in #3861. This better aligns with the output of TypeScript and common test formats.

It looks like that page has the right format documented?

The default formatter which outputs simple human-readable messages.

Sample Output

ERROR: myFile.ts[1, 14]: Missing semicolon

@blueyed
Copy link

blueyed commented Feb 11, 2019

It looks like that page has the right format documented?

No.

It should say ERROR: myFile.ts:1:14 - Missing semicolon there.

@JoshuaKGoldberg
Copy link
Contributor

Oh, yes, you're right 😄 this should be changed.

@blueyed
Copy link

blueyed commented Feb 11, 2019

Thanks.

Can you provide input on if there is a ERROR/WARNING prefix always?
It looks like there is only "error" and "warning" (and "off") for severity, isn't there?
(https://github.com/neomake/neomake/pull/2313/files#diff-fcb968db903a53dffeee05395d35d327R30)

@JoshuaKGoldberg
Copy link
Contributor

Correct:

export type RuleSeverity = "warning" | "error" | "off";

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants