Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint flat configurations? #374

Open
Scc33 opened this issue Apr 9, 2024 · 3 comments
Open

ESLint flat configurations? #374

Scc33 opened this issue Apr 9, 2024 · 3 comments

Comments

@Scc33
Copy link

Scc33 commented Apr 9, 2024

ESLint v9 has rolled out flat configs.

I didn't see this plugin listed in their tracker (eslint/eslint#18093) nor do I see any documentation for how to use this plugin in a flat config.

Was wondering if that was supported by this project or if there are plans to support it.

@ssbarnea
Copy link

Clearly documentation needs to be updated to cover for eslint v9. I do have a WIP on ansible/vscode-ansible#1223 which enables tsdoc plugin and one rule but I am wondering which is correct way to do it.

My expectation was that I would not need to define the extra tsdoc/syntax rule in order to enable it and instead of make use of extends to enable them.

@blipk
Copy link

blipk commented Sep 8, 2024

It's possible to enable like below:

import tsdoceslint from "eslint-plugin-tsdoc"

// ...

    plugins : {
        "tsdoc": tsdoceslint
    },
    rules : {
        "tsdoc/syntax": "warn",
    },

/// ...

However it's not possible to disable a single rule as eslint-plugin-tsdoc is expecting "ignore" but the new format requires "off" or 0

e.g. Still warns for the extra rule in the VSCode ESLint extension and when running ESLint

rules : {
    "tsdoc/syntax": "warn",
    "tsdoc/tsdoc-reference-missing-hash": [ "off" ]
},

e.g. Does not warn for the extra rule in the VSCode ESlint extension but ESLint refuses to run with the error below

rules : {
    "tsdoc/syntax": "warn",
    "tsdoc/tsdoc-reference-missing-hash": [ "ignore" ]
},
Configuration for rule "tsdoc/tsdoc-reference-missing-hash" is invalid. Expected severity of "off", 0, "warn", 1, "error", or 2.

You passed '"ignore"'.

@beorn
Copy link

beorn commented Oct 27, 2024

What's the correct way to use this with ESLint 9?

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

No branches or pull requests

4 participants