Update to ESLint 9's "flat" configuration file format.

This commit is contained in:
David Anson 2024-04-20 21:23:06 -07:00
parent 36844eefef
commit c6716f9bac
9 changed files with 155 additions and 191 deletions

View file

@ -1598,22 +1598,12 @@ test("customRulesLintJavaScript", (t) => new Promise((resolve) => {
t.falsy(err);
const expected = {
"test/lint-javascript.md": [
{
"lineNumber": 10,
"ruleNames": [ "lint-javascript" ],
"ruleDescription": "Rule that lints JavaScript code",
"ruleInformation": null,
"errorDetail": "Unexpected var, use let or const instead.",
"errorContext": "var x = 0;",
"errorRange": null,
"fixInfo": null
},
{
"lineNumber": 12,
"ruleNames": [ "lint-javascript" ],
"ruleDescription": "Rule that lints JavaScript code",
"ruleInformation": null,
"errorDetail": "Unexpected console statement.",
"errorDetail": "'console' is not defined.",
"errorContext": "console.log(x);",
"errorRange": null,
"fixInfo": null