ESLint flat configurations?
ESLint v9 has rolled out flat configs.
I didn't see this plugin listed in their tracker (https://github.com/eslint/eslint/issues/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.
Clearly documentation needs to be updated to cover for eslint v9. I do have a WIP on https://github.com/ansible/vscode-ansible/pull/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.
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"'.
What's the correct way to use this with ESLint 9?