DavidAnson / vscode-markdownlint

Markdown linting and style checking for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint
MIT License
930 stars 170 forks source link

Configure default severity #241

Open Bobronium opened 2 years ago

Bobronium commented 2 years ago

I'm trying to configure default rules severity, but I guess, it doesn't work like that:

    "markdownlint.config": {
        "default": {
            "severity": "Information"
        },
    },

Is there a way to do it?

Upd.

Ok, I see now that severity is hardcoded here: https://github.com/DavidAnson/vscode-markdownlint/blob/522848a8cfe336bbc58056689e1a09f7dc8564f5/extension.js#L598

Can we make it configurable?

DavidAnson commented 1 year ago

Why do you want this? The current use of Warning seems appropriate according to the VS Code definitions:

    /**
     * Represents the severity of diagnostics.
     */
    export enum DiagnosticSeverity {

        /**
         * Something not allowed by the rules of a language or other means.
         */
        Error = 0,

        /**
         * Something suspicious but allowed.
         */
        Warning = 1,

        /**
         * Something to inform about but not a problem.
         */
        Information = 2,

        /**
         * Something to hint to a better way of doing it, like proposing
         * a refactoring.
         */
        Hint = 3
    }
Bobronium commented 1 year ago

I'm not saying it's wrong in any way.

It's usually configurable in other linters (pyright, etc.) and it gives certain flexibility when configuring a bunch of plugins/theme combo.

DavidAnson commented 1 year ago

Thanks. What changes if you were able to change these from Warning to Information? Are there different policies that kick in or something?

Bobronium commented 1 year ago

It allows in turn to configure a visual scheme for one's taste.

For instance: https://github.com/Bobronium/vscode-pycharm-darcula-theme#linting-highlighting