From d149e982303026f9e95ce0267c569e6d954c80f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Wed, 19 Jul 2023 11:13:27 +0800 Subject: [PATCH] fix: use latest ECMAScript version in tests --- tests/lib/rules/no-only-tests.js | 2 +- tests/lib/rules/prefer-output-null.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/rules/no-only-tests.js b/tests/lib/rules/no-only-tests.js index ed892aa6..29882439 100644 --- a/tests/lib/rules/no-only-tests.js +++ b/tests/lib/rules/no-only-tests.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; // Tests // ------------------------------------------------------------------------------ -const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6 } }); +const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 'latest' } }); ruleTester.run('no-only-tests', rule, { valid: [ // No test cases with `only` diff --git a/tests/lib/rules/prefer-output-null.js b/tests/lib/rules/prefer-output-null.js index 910a8093..8fe57bcc 100644 --- a/tests/lib/rules/prefer-output-null.js +++ b/tests/lib/rules/prefer-output-null.js @@ -18,7 +18,7 @@ const ERROR = { messageId: 'useOutputNull', type: 'Property' }; // Tests // ------------------------------------------------------------------------------ -const ruleTester = new RuleTester(); +const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 'latest' } }); ruleTester.run('prefer-output-null', rule, { valid: [ `