From 2db017e805f18d8f872bb53d005cd4548401e063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20LUDWIG?= Date: Wed, 18 Sep 2024 00:20:22 +0200 Subject: [PATCH] test: ensure we do not use deprecated rules --- .eslintrc.json | 1 - test/validate-config.js | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 229ad6d..d31b55e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -129,7 +129,6 @@ "no-var": "error", "no-void": ["error", { "allowAsStatement": true }], "no-with": "error", - "no-return-await": "error", "object-shorthand": ["error", "properties"], "one-var": ["error", { "initialized": "never" }], "prefer-const": ["error", { "destructuring": "all" }], diff --git a/test/validate-config.js b/test/validate-config.js index 1218126..735940b 100644 --- a/test/validate-config.js +++ b/test/validate-config.js @@ -20,6 +20,17 @@ test("ensure we validate correctly JavaScript files", async () => { assert.strictEqual(withErrors?.errorCount, 3) }) +test("ensure we do not use deprecated rules", async () => { + const [javascriptLintResult] = await eslint.lintFiles( + "test/fixtures/javascript-no-errors.js", + ) + const [typescriptLintResult] = await eslint.lintFiles( + "test/fixtures/typescript-no-errors.ts", + ) + assert.strictEqual(javascriptLintResult.usedDeprecatedRules.length, 0) + assert.strictEqual(typescriptLintResult.usedDeprecatedRules.length, 0) +}) + test("ensure we validate correctly TypeScript files", async () => { const [noErrors] = await eslint.lintFiles( "test/fixtures/typescript-no-errors.ts",