From 99e973c3040b42fbf8ad9ef1a5cd35fb84adc898 Mon Sep 17 00:00:00 2001 From: Bryan Mishkin <698306+bmish@users.noreply.github.com> Date: Sat, 4 Nov 2023 16:11:52 -0400 Subject: [PATCH] breaking: use ecmaVersion 2022 in base config --- .eslintrc.js | 4 +- lib/config/base.js | 4 +- .../rules-preprocessor/gjs-gts-parser-test.js | 2 +- tests/lib/rules/alias-model-in-controller.js | 2 +- .../avoid-leaking-state-in-ember-objects.js | 2 +- .../rules/avoid-using-needs-in-controllers.js | 2 +- tests/lib/rules/classic-decorator-hooks.js | 2 +- .../classic-decorator-no-classic-methods.js | 2 +- tests/lib/rules/closure-actions.js | 2 +- tests/lib/rules/computed-property-getters.js | 2 +- tests/lib/rules/jquery-ember-run.js | 2 +- .../lib/rules/named-functions-in-promises.js | 2 +- tests/lib/rules/new-module-imports.js | 28 +++---- tests/lib/rules/no-actions-hash.js | 2 +- .../rules/no-array-prototype-extensions.js | 2 +- .../no-arrow-function-computed-properties.js | 2 +- ...ed-properties-used-in-tracking-contexts.js | 2 +- .../lib/rules/no-at-ember-render-modifiers.js | 2 +- tests/lib/rules/no-attrs-in-components.js | 2 +- tests/lib/rules/no-attrs-snapshot.js | 2 +- .../lib/rules/no-capital-letters-in-routes.js | 2 +- tests/lib/rules/no-classic-classes.js | 2 +- tests/lib/rules/no-classic-components.js | 2 +- .../lib/rules/no-component-lifecycle-hooks.js | 2 +- ...o-computed-properties-in-native-classes.js | 2 +- .../rules/no-controller-access-in-routes.js | 2 +- tests/lib/rules/no-controllers.js | 2 +- tests/lib/rules/no-current-route-name.js | 2 +- ...-deeply-nested-dependent-keys-with-each.js | 2 +- ...no-deprecated-router-transition-methods.js | 2 +- .../lib/rules/no-duplicate-dependent-keys.js | 2 +- .../lib/rules/no-ember-super-in-es-classes.js | 2 +- .../rules/no-ember-testing-in-module-scope.js | 2 +- tests/lib/rules/no-empty-attrs.js | 4 +- .../no-empty-glimmer-component-classes.js | 2 +- .../rules/no-function-prototype-extensions.js | 2 +- tests/lib/rules/no-get-with-default.js | 2 +- tests/lib/rules/no-get.js | 6 +- tests/lib/rules/no-global-jquery.js | 2 +- tests/lib/rules/no-html-safe.js | 2 +- tests/lib/rules/no-implicit-injections.js | 2 +- .../no-implicit-service-injection-argument.js | 2 +- ...t-calls-with-inline-anonymous-functions.js | 2 +- .../lib/rules/no-incorrect-computed-macros.js | 2 +- .../no-invalid-debug-function-arguments.js | 2 +- tests/lib/rules/no-invalid-dependent-keys.js | 2 +- tests/lib/rules/no-invalid-test-waiters.js | 2 +- tests/lib/rules/no-jquery.js | 2 +- tests/lib/rules/no-legacy-test-waiters.js | 2 +- tests/lib/rules/no-mixins.js | 2 +- tests/lib/rules/no-new-mixins.js | 2 +- .../rules/no-noop-setup-on-error-in-before.js | 2 +- tests/lib/rules/no-observers.js | 2 +- tests/lib/rules/no-old-shims.js | 2 +- tests/lib/rules/no-on-calls-in-components.js | 4 +- tests/lib/rules/no-pause-test.js | 2 +- tests/lib/rules/no-private-routing-service.js | 2 +- tests/lib/rules/no-proxies.js | 2 +- .../no-restricted-property-modifications.js | 2 +- .../lib/rules/no-restricted-resolver-tests.js | 2 +- .../rules/no-restricted-service-injections.js | 2 +- tests/lib/rules/no-runloop.js | 2 +- .../lib/rules/no-settled-after-test-helper.js | 2 +- tests/lib/rules/no-shadow-route-definition.js | 2 +- tests/lib/rules/no-side-effects.js | 12 +-- .../rules/no-string-prototype-extensions.js | 2 +- tests/lib/rules/no-test-and-then.js | 2 +- tests/lib/rules/no-test-import-export.js | 2 +- tests/lib/rules/no-test-module-for.js | 2 +- tests/lib/rules/no-test-support-import.js | 2 +- tests/lib/rules/no-test-this-render.js | 2 +- .../rules/no-tracked-properties-from-args.js | 6 +- tests/lib/rules/no-try-invoke.js | 2 +- ...-unnecessary-service-injection-argument.js | 4 +- tests/lib/rules/no-unused-services.js | 2 +- .../rules/no-volatile-computed-properties.js | 6 +- tests/lib/rules/order-in-components.js | 12 +-- tests/lib/rules/order-in-controllers.js | 8 +- tests/lib/rules/order-in-models.js | 8 +- tests/lib/rules/order-in-routes.js | 6 +- tests/lib/rules/prefer-ember-test-helpers.js | 2 +- tests/lib/rules/require-computed-macros.js | 2 +- .../require-computed-property-dependencies.js | 2 +- tests/lib/rules/require-fetch-import.js | 2 +- .../lib/rules/require-return-from-computed.js | 4 +- .../rules/require-super-in-lifecycle-hooks.js | 4 +- tests/lib/rules/require-tagless-components.js | 2 +- ...uire-valid-css-selector-in-test-helpers.js | 2 +- tests/lib/rules/route-path-style.js | 2 +- tests/lib/rules/template-indent.js | 4 +- tests/lib/rules/template-no-let-reference.js | 2 +- tests/lib/rules/use-brace-expansion.js | 2 +- .../rules/use-ember-data-rfc-395-imports.js | 2 +- tests/lib/rules/use-ember-get-and-set.js | 84 +++++++++---------- 94 files changed, 180 insertions(+), 180 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 75b7398689..1c82ec6338 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,7 +4,7 @@ module.exports = { root: true, parser: '@babel/eslint-parser', parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'script', babelOptions: { configFile: require.resolve('./.babelrc'), @@ -24,7 +24,7 @@ module.exports = { 'prettier', ], env: { - es2020: true, + es2022: true, node: true, jest: true, }, diff --git a/lib/config/base.js b/lib/config/base.js index 9bb27a994c..bb58ec1e3b 100644 --- a/lib/config/base.js +++ b/lib/config/base.js @@ -2,13 +2,13 @@ module.exports = { root: true, parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, env: { browser: true, - es2020: true, + es2022: true, }, plugins: ['ember'], diff --git a/tests/lib/rules-preprocessor/gjs-gts-parser-test.js b/tests/lib/rules-preprocessor/gjs-gts-parser-test.js index 9fab97661e..3d9bb10a2d 100644 --- a/tests/lib/rules-preprocessor/gjs-gts-parser-test.js +++ b/tests/lib/rules-preprocessor/gjs-gts-parser-test.js @@ -30,7 +30,7 @@ function initESLint(parser = gjsGtsParser) { browser: true, }, parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, parser, diff --git a/tests/lib/rules/alias-model-in-controller.js b/tests/lib/rules/alias-model-in-controller.js index 2dd28a9134..433010dd7c 100644 --- a/tests/lib/rules/alias-model-in-controller.js +++ b/tests/lib/rules/alias-model-in-controller.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('alias-model-in-controller', rule, { diff --git a/tests/lib/rules/avoid-leaking-state-in-ember-objects.js b/tests/lib/rules/avoid-leaking-state-in-ember-objects.js index b093ddb37e..b1f4afcbbb 100644 --- a/tests/lib/rules/avoid-leaking-state-in-ember-objects.js +++ b/tests/lib/rules/avoid-leaking-state-in-ember-objects.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const eslintTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('avoid-leaking-state-in-ember-objects', rule, { valid: [ diff --git a/tests/lib/rules/avoid-using-needs-in-controllers.js b/tests/lib/rules/avoid-using-needs-in-controllers.js index 9b9fada141..8cd5fcb7b1 100644 --- a/tests/lib/rules/avoid-using-needs-in-controllers.js +++ b/tests/lib/rules/avoid-using-needs-in-controllers.js @@ -12,7 +12,7 @@ const RuleTester = require('eslint').RuleTester; const eslintTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/classic-decorator-hooks.js b/tests/lib/rules/classic-decorator-hooks.js index d2c808b953..6caac98d65 100644 --- a/tests/lib/rules/classic-decorator-hooks.js +++ b/tests/lib/rules/classic-decorator-hooks.js @@ -11,7 +11,7 @@ const { const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('classic-decorator-hooks', rule, { diff --git a/tests/lib/rules/classic-decorator-no-classic-methods.js b/tests/lib/rules/classic-decorator-no-classic-methods.js index 27ff26ec61..393e769fc9 100644 --- a/tests/lib/rules/classic-decorator-no-classic-methods.js +++ b/tests/lib/rules/classic-decorator-no-classic-methods.js @@ -7,7 +7,7 @@ const { disallowedMethodErrorMessage } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('classic-decorator-no-classic-methods', rule, { diff --git a/tests/lib/rules/closure-actions.js b/tests/lib/rules/closure-actions.js index 1a571c32a7..9d30fce4c1 100644 --- a/tests/lib/rules/closure-actions.js +++ b/tests/lib/rules/closure-actions.js @@ -12,7 +12,7 @@ const { ERROR_MESSAGE } = rule; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('closure-actions', rule, { diff --git a/tests/lib/rules/computed-property-getters.js b/tests/lib/rules/computed-property-getters.js index 1b58983780..aaedcbf279 100644 --- a/tests/lib/rules/computed-property-getters.js +++ b/tests/lib/rules/computed-property-getters.js @@ -14,7 +14,7 @@ const { addComputedImport } = require('../../helpers/test-case'); const { PREVENT_GETTER_MESSAGE, ALWAYS_GETTER_MESSAGE, ALWAYS_WITH_SETTER_MESSAGE } = rule; const ruleTester = new RuleTester(); -const parserOptions = { ecmaVersion: 2020, sourceType: 'module' }; +const parserOptions = { ecmaVersion: 2022, sourceType: 'module' }; const output = null; const alwaysWithSetterOptionErrors = [ diff --git a/tests/lib/rules/jquery-ember-run.js b/tests/lib/rules/jquery-ember-run.js index 9237040a85..e036292f5c 100644 --- a/tests/lib/rules/jquery-ember-run.js +++ b/tests/lib/rules/jquery-ember-run.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('jquery-ember-run', rule, { diff --git a/tests/lib/rules/named-functions-in-promises.js b/tests/lib/rules/named-functions-in-promises.js index 4fbfe0c44e..35c5235226 100644 --- a/tests/lib/rules/named-functions-in-promises.js +++ b/tests/lib/rules/named-functions-in-promises.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020 }, + parserOptions: { ecmaVersion: 2022 }, }); eslintTester.run('named-functions-in-promises', rule, { diff --git a/tests/lib/rules/new-module-imports.js b/tests/lib/rules/new-module-imports.js index 24b6bf4885..802adfb1f2 100644 --- a/tests/lib/rules/new-module-imports.js +++ b/tests/lib/rules/new-module-imports.js @@ -19,7 +19,7 @@ eslintTester.run('new-module-imports', rule, { const { Handlebars: { Utils: { escapeExpression } } } = Ember `, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, 'Ember.Handlebars.Utils.escapeExpression("foo");', 'Ember.onerror = function() {};', @@ -31,7 +31,7 @@ eslintTester.run('new-module-imports', rule, { export default Component.extend({}); `, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: ` @@ -43,22 +43,22 @@ eslintTester.run('new-module-imports', rule, { ...foo }); `, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: `import LOL from 'who-knows-but-definitely-not-ember'; const { Controller } = LOL; `, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: 'export const Ember = 1;', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: 'for (let i = 0; i < 10; i++) { }', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, 'SomethingRandom.Ember.Service;', ], @@ -71,7 +71,7 @@ eslintTester.run('new-module-imports', rule, { export default Component.extend({}); `, output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -86,7 +86,7 @@ eslintTester.run('new-module-imports', rule, { const { Controller } = LOL; `, output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -103,7 +103,7 @@ eslintTester.run('new-module-imports', rule, { export default Controller.extend({}); `, output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: "Use `import $ from 'jquery';` instead of using Ember destructuring", @@ -125,7 +125,7 @@ eslintTester.run('new-module-imports', rule, { export default Component.extend({}); `, output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -149,7 +149,7 @@ eslintTester.run('new-module-imports', rule, { }); `, output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -178,7 +178,7 @@ eslintTester.run('new-module-imports', rule, { export default Component.extend({}); `, output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -195,7 +195,7 @@ eslintTester.run('new-module-imports', rule, { { code: 'export default Ember.Service;', output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: "Use `import Service from '@ember/service';` instead of using Ember.Service", @@ -206,7 +206,7 @@ eslintTester.run('new-module-imports', rule, { { code: 'export default Ember.Service.extend({});', output: null, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: "Use `import Service from '@ember/service';` instead of using Ember.Service", diff --git a/tests/lib/rules/no-actions-hash.js b/tests/lib/rules/no-actions-hash.js index 4c83531996..f1518d00e7 100644 --- a/tests/lib/rules/no-actions-hash.js +++ b/tests/lib/rules/no-actions-hash.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-actions-hash', rule, { valid: [ diff --git a/tests/lib/rules/no-array-prototype-extensions.js b/tests/lib/rules/no-array-prototype-extensions.js index 1d3a560dd5..86d3a81a82 100644 --- a/tests/lib/rules/no-array-prototype-extensions.js +++ b/tests/lib/rules/no-array-prototype-extensions.js @@ -9,7 +9,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-array-prototype-extensions', rule, { diff --git a/tests/lib/rules/no-arrow-function-computed-properties.js b/tests/lib/rules/no-arrow-function-computed-properties.js index e025abcf99..36d76edf87 100644 --- a/tests/lib/rules/no-arrow-function-computed-properties.js +++ b/tests/lib/rules/no-arrow-function-computed-properties.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-assignment-of-untracked-properties-used-in-tracking-contexts.js b/tests/lib/rules/no-assignment-of-untracked-properties-used-in-tracking-contexts.js index fd36f1bb90..1f284a4e4b 100644 --- a/tests/lib/rules/no-assignment-of-untracked-properties-used-in-tracking-contexts.js +++ b/tests/lib/rules/no-assignment-of-untracked-properties-used-in-tracking-contexts.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', babelOptions: { configFile: require.resolve('../../../.babelrc'), diff --git a/tests/lib/rules/no-at-ember-render-modifiers.js b/tests/lib/rules/no-at-ember-render-modifiers.js index 2a7b093156..d6a7898fcf 100644 --- a/tests/lib/rules/no-at-ember-render-modifiers.js +++ b/tests/lib/rules/no-at-ember-render-modifiers.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-attrs-in-components.js b/tests/lib/rules/no-attrs-in-components.js index 4dec5646b1..c01dccb63f 100644 --- a/tests/lib/rules/no-attrs-in-components.js +++ b/tests/lib/rules/no-attrs-in-components.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; //------------------------------------------------------------------------------ const ruleTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); diff --git a/tests/lib/rules/no-attrs-snapshot.js b/tests/lib/rules/no-attrs-snapshot.js index 9909add757..81d2643a7f 100644 --- a/tests/lib/rules/no-attrs-snapshot.js +++ b/tests/lib/rules/no-attrs-snapshot.js @@ -3,7 +3,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); diff --git a/tests/lib/rules/no-capital-letters-in-routes.js b/tests/lib/rules/no-capital-letters-in-routes.js index 8309330b28..3d9a849671 100644 --- a/tests/lib/rules/no-capital-letters-in-routes.js +++ b/tests/lib/rules/no-capital-letters-in-routes.js @@ -12,7 +12,7 @@ const RuleTester = require('eslint').RuleTester; //------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-capital-letters-in-routes', rule, { valid: [ diff --git a/tests/lib/rules/no-classic-classes.js b/tests/lib/rules/no-classic-classes.js index c64b6a2286..a99d41a422 100644 --- a/tests/lib/rules/no-classic-classes.js +++ b/tests/lib/rules/no-classic-classes.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE_NO_CLASSIC_CLASSES: ERROR_MESSAGE } = rule; //------------------------------------------------------------------------------ const ruleTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-classic-classes', rule, { diff --git a/tests/lib/rules/no-classic-components.js b/tests/lib/rules/no-classic-components.js index 3a85e5f969..b0665581c3 100644 --- a/tests/lib/rules/no-classic-components.js +++ b/tests/lib/rules/no-classic-components.js @@ -13,7 +13,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const parserOptions = { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }; const ruleTester = new RuleTester({ parserOptions }); diff --git a/tests/lib/rules/no-component-lifecycle-hooks.js b/tests/lib/rules/no-component-lifecycle-hooks.js index 85b4cb3b6d..7ea99b0351 100644 --- a/tests/lib/rules/no-component-lifecycle-hooks.js +++ b/tests/lib/rules/no-component-lifecycle-hooks.js @@ -6,7 +6,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE_NO_COMPONENT_LIFECYCLE_HOOKS: ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-component-lifecycle-hooks', rule, { diff --git a/tests/lib/rules/no-computed-properties-in-native-classes.js b/tests/lib/rules/no-computed-properties-in-native-classes.js index 2cccdf3ce6..feadffc041 100644 --- a/tests/lib/rules/no-computed-properties-in-native-classes.js +++ b/tests/lib/rules/no-computed-properties-in-native-classes.js @@ -8,7 +8,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-controller-access-in-routes.js b/tests/lib/rules/no-controller-access-in-routes.js index 3674142671..cbbf6a60a6 100644 --- a/tests/lib/rules/no-controller-access-in-routes.js +++ b/tests/lib/rules/no-controller-access-in-routes.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-controllers.js b/tests/lib/rules/no-controllers.js index 508c695eb0..b8bec62f45 100644 --- a/tests/lib/rules/no-controllers.js +++ b/tests/lib/rules/no-controllers.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-controllers', rule, { valid: [ diff --git a/tests/lib/rules/no-current-route-name.js b/tests/lib/rules/no-current-route-name.js index 94a5b7d60e..4e8a234fcc 100644 --- a/tests/lib/rules/no-current-route-name.js +++ b/tests/lib/rules/no-current-route-name.js @@ -6,7 +6,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-current-route-name', rule, { diff --git a/tests/lib/rules/no-deeply-nested-dependent-keys-with-each.js b/tests/lib/rules/no-deeply-nested-dependent-keys-with-each.js index 6f2458d7b1..84aa570cda 100644 --- a/tests/lib/rules/no-deeply-nested-dependent-keys-with-each.js +++ b/tests/lib/rules/no-deeply-nested-dependent-keys-with-each.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-deprecated-router-transition-methods.js b/tests/lib/rules/no-deprecated-router-transition-methods.js index 1752e96621..54d59f21b1 100644 --- a/tests/lib/rules/no-deprecated-router-transition-methods.js +++ b/tests/lib/rules/no-deprecated-router-transition-methods.js @@ -12,7 +12,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', babelOptions: { configFile: require.resolve('../../../.babelrc'), diff --git a/tests/lib/rules/no-duplicate-dependent-keys.js b/tests/lib/rules/no-duplicate-dependent-keys.js index 7845da4af3..c4f15af6cd 100644 --- a/tests/lib/rules/no-duplicate-dependent-keys.js +++ b/tests/lib/rules/no-duplicate-dependent-keys.js @@ -16,7 +16,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-ember-super-in-es-classes.js b/tests/lib/rules/no-ember-super-in-es-classes.js index 19b4af4a91..0a016a38f4 100644 --- a/tests/lib/rules/no-ember-super-in-es-classes.js +++ b/tests/lib/rules/no-ember-super-in-es-classes.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020 }, + parserOptions: { ecmaVersion: 2022 }, }); eslintTester.run('no-ember-super-in-es-classes', rule, { diff --git a/tests/lib/rules/no-ember-testing-in-module-scope.js b/tests/lib/rules/no-ember-testing-in-module-scope.js index c995b88baf..8357be7c0c 100644 --- a/tests/lib/rules/no-ember-testing-in-module-scope.js +++ b/tests/lib/rules/no-ember-testing-in-module-scope.js @@ -6,7 +6,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGES } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-empty-attrs.js b/tests/lib/rules/no-empty-attrs.js index 4807b8f520..ba5b642a78 100644 --- a/tests/lib/rules/no-empty-attrs.js +++ b/tests/lib/rules/no-empty-attrs.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); const message = 'Supply proper attribute type'; @@ -24,7 +24,7 @@ eslintTester.run('no-empty-attrs', rule, { code: `someArrayOfStrings.filter(function(attr) { return attr.underscore(); });`, - parserOptions: { ecmaVersion: 2020 }, + parserOptions: { ecmaVersion: 2022 }, }, `export default Model.extend({ someArray: someArrayOfStrings.filter(function(attr) { diff --git a/tests/lib/rules/no-empty-glimmer-component-classes.js b/tests/lib/rules/no-empty-glimmer-component-classes.js index 394be8622b..d6c7416f48 100644 --- a/tests/lib/rules/no-empty-glimmer-component-classes.js +++ b/tests/lib/rules/no-empty-glimmer-component-classes.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-function-prototype-extensions.js b/tests/lib/rules/no-function-prototype-extensions.js index 677b7be27a..6a6cdcbdd7 100644 --- a/tests/lib/rules/no-function-prototype-extensions.js +++ b/tests/lib/rules/no-function-prototype-extensions.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-function-prototype-extensions', rule, { diff --git a/tests/lib/rules/no-get-with-default.js b/tests/lib/rules/no-get-with-default.js index 71afcbd469..b79abc896e 100644 --- a/tests/lib/rules/no-get-with-default.js +++ b/tests/lib/rules/no-get-with-default.js @@ -4,7 +4,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-get.js b/tests/lib/rules/no-get.js index ec4c7566f3..e2469dcefa 100644 --- a/tests/lib/rules/no-get.js +++ b/tests/lib/rules/no-get.js @@ -7,7 +7,7 @@ const { ERROR_MESSAGE_GET, ERROR_MESSAGE_GET_PROPERTIES } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); @@ -31,11 +31,11 @@ ruleTester.run('no-get', rule, { // Template literals. { code: 'this.get(`foo`);', - parserOptions: { ecmaVersion: 2020 }, + parserOptions: { ecmaVersion: 2022 }, }, { code: "import { get } from '@ember/object'; get(this, `foo`);", - parserOptions: { ecmaVersion: 2020 }, + parserOptions: { ecmaVersion: 2022 }, }, // Not `this`. diff --git a/tests/lib/rules/no-global-jquery.js b/tests/lib/rules/no-global-jquery.js index 9d7e293cf3..04aaa842b9 100644 --- a/tests/lib/rules/no-global-jquery.js +++ b/tests/lib/rules/no-global-jquery.js @@ -13,7 +13,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester(); const parserOptions = { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }; const globals = { $: true, jQuery: true }; diff --git a/tests/lib/rules/no-html-safe.js b/tests/lib/rules/no-html-safe.js index b5d2c7cb97..483056b8f1 100644 --- a/tests/lib/rules/no-html-safe.js +++ b/tests/lib/rules/no-html-safe.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-implicit-injections.js b/tests/lib/rules/no-implicit-injections.js index 5a9e1fc6bc..bf85d8e3d4 100644 --- a/tests/lib/rules/no-implicit-injections.js +++ b/tests/lib/rules/no-implicit-injections.js @@ -12,7 +12,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', babelOptions: { configFile: require.resolve('../../../.babelrc'), diff --git a/tests/lib/rules/no-implicit-service-injection-argument.js b/tests/lib/rules/no-implicit-service-injection-argument.js index 28a146eb57..2cac56d86f 100644 --- a/tests/lib/rules/no-implicit-service-injection-argument.js +++ b/tests/lib/rules/no-implicit-service-injection-argument.js @@ -18,7 +18,7 @@ const NEW_SERVICE_IMPORT = "import {service} from '@ember/service';"; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-incorrect-calls-with-inline-anonymous-functions.js b/tests/lib/rules/no-incorrect-calls-with-inline-anonymous-functions.js index ca1661d17b..deaed8772a 100644 --- a/tests/lib/rules/no-incorrect-calls-with-inline-anonymous-functions.js +++ b/tests/lib/rules/no-incorrect-calls-with-inline-anonymous-functions.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-incorrect-computed-macros.js b/tests/lib/rules/no-incorrect-computed-macros.js index 1a0e06d206..7055610c8b 100644 --- a/tests/lib/rules/no-incorrect-computed-macros.js +++ b/tests/lib/rules/no-incorrect-computed-macros.js @@ -15,7 +15,7 @@ const { ERROR_MESSAGE_AND_OR } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-invalid-debug-function-arguments.js b/tests/lib/rules/no-invalid-debug-function-arguments.js index fa72f4d4d2..8c7fdd4174 100644 --- a/tests/lib/rules/no-invalid-debug-function-arguments.js +++ b/tests/lib/rules/no-invalid-debug-function-arguments.js @@ -115,7 +115,7 @@ const INVALID_USAGES = DEBUG_FUNCTIONS.flatMap((debugFunction) => [ const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-invalid-dependent-keys.js b/tests/lib/rules/no-invalid-dependent-keys.js index 1f882b2114..7b2391712a 100644 --- a/tests/lib/rules/no-invalid-dependent-keys.js +++ b/tests/lib/rules/no-invalid-dependent-keys.js @@ -18,7 +18,7 @@ const { const eslintTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-invalid-test-waiters.js b/tests/lib/rules/no-invalid-test-waiters.js index 61417d33ec..4373a48deb 100644 --- a/tests/lib/rules/no-invalid-test-waiters.js +++ b/tests/lib/rules/no-invalid-test-waiters.js @@ -7,7 +7,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-jquery.js b/tests/lib/rules/no-jquery.js index 455e68c973..11c0935613 100644 --- a/tests/lib/rules/no-jquery.js +++ b/tests/lib/rules/no-jquery.js @@ -3,7 +3,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-jquery', rule, { diff --git a/tests/lib/rules/no-legacy-test-waiters.js b/tests/lib/rules/no-legacy-test-waiters.js index f0615030d3..65ea6c8d23 100644 --- a/tests/lib/rules/no-legacy-test-waiters.js +++ b/tests/lib/rules/no-legacy-test-waiters.js @@ -5,7 +5,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-mixins.js b/tests/lib/rules/no-mixins.js index 977ff8a51b..0996e01849 100644 --- a/tests/lib/rules/no-mixins.js +++ b/tests/lib/rules/no-mixins.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-mixins', rule, { valid: [ diff --git a/tests/lib/rules/no-new-mixins.js b/tests/lib/rules/no-new-mixins.js index f18e6b7894..622cff9c6e 100644 --- a/tests/lib/rules/no-new-mixins.js +++ b/tests/lib/rules/no-new-mixins.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-new-mixins', rule, { valid: [ diff --git a/tests/lib/rules/no-noop-setup-on-error-in-before.js b/tests/lib/rules/no-noop-setup-on-error-in-before.js index 1b5a6f4872..640df35330 100644 --- a/tests/lib/rules/no-noop-setup-on-error-in-before.js +++ b/tests/lib/rules/no-noop-setup-on-error-in-before.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-observers.js b/tests/lib/rules/no-observers.js index 0851267dee..999fa8325b 100644 --- a/tests/lib/rules/no-observers.js +++ b/tests/lib/rules/no-observers.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true, diff --git a/tests/lib/rules/no-old-shims.js b/tests/lib/rules/no-old-shims.js index 2869161036..035b8d4883 100644 --- a/tests/lib/rules/no-old-shims.js +++ b/tests/lib/rules/no-old-shims.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-old-shims', rule, { diff --git a/tests/lib/rules/no-on-calls-in-components.js b/tests/lib/rules/no-on-calls-in-components.js index 8f302dcb95..aea8ad95c6 100644 --- a/tests/lib/rules/no-on-calls-in-components.js +++ b/tests/lib/rules/no-on-calls-in-components.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); const message = "Don't use .on() for component lifecycle events."; @@ -40,7 +40,7 @@ eslintTester.run('no-on-calls-in-components', rule, { ...foo, }); `, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, ], invalid: [ diff --git a/tests/lib/rules/no-pause-test.js b/tests/lib/rules/no-pause-test.js index 10a46fd58d..51d4391f65 100644 --- a/tests/lib/rules/no-pause-test.js +++ b/tests/lib/rules/no-pause-test.js @@ -17,7 +17,7 @@ const TEST_FILE_NAME = 'some-test.js'; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-private-routing-service.js b/tests/lib/rules/no-private-routing-service.js index e95581fe50..802f304fff 100644 --- a/tests/lib/rules/no-private-routing-service.js +++ b/tests/lib/rules/no-private-routing-service.js @@ -22,7 +22,7 @@ const NEW_SERVICE_IMPORT = "import {service} from '@ember/service';"; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-proxies.js b/tests/lib/rules/no-proxies.js index 0d7601cc59..ea5ad94a4e 100644 --- a/tests/lib/rules/no-proxies.js +++ b/tests/lib/rules/no-proxies.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-restricted-property-modifications.js b/tests/lib/rules/no-restricted-property-modifications.js index 535002bc02..5d1f03d128 100644 --- a/tests/lib/rules/no-restricted-property-modifications.js +++ b/tests/lib/rules/no-restricted-property-modifications.js @@ -5,7 +5,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-restricted-resolver-tests.js b/tests/lib/rules/no-restricted-resolver-tests.js index 79bbc4d04c..f05e91e1bb 100644 --- a/tests/lib/rules/no-restricted-resolver-tests.js +++ b/tests/lib/rules/no-restricted-resolver-tests.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGES } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-restricted-resolver-tests', rule, { valid: [ diff --git a/tests/lib/rules/no-restricted-service-injections.js b/tests/lib/rules/no-restricted-service-injections.js index 05b6dbe0ad..532e69ceb7 100644 --- a/tests/lib/rules/no-restricted-service-injections.js +++ b/tests/lib/rules/no-restricted-service-injections.js @@ -11,7 +11,7 @@ const NEW_SERVICE_IMPORT = "import {service} from '@ember/service';"; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-runloop.js b/tests/lib/rules/no-runloop.js index 953a420822..e7d75c3c63 100644 --- a/tests/lib/rules/no-runloop.js +++ b/tests/lib/rules/no-runloop.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-runloop', rule, { diff --git a/tests/lib/rules/no-settled-after-test-helper.js b/tests/lib/rules/no-settled-after-test-helper.js index dbaae825b4..7966dfc6c3 100644 --- a/tests/lib/rules/no-settled-after-test-helper.js +++ b/tests/lib/rules/no-settled-after-test-helper.js @@ -6,7 +6,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-shadow-route-definition.js b/tests/lib/rules/no-shadow-route-definition.js index 41df2a420d..7df501f2f3 100644 --- a/tests/lib/rules/no-shadow-route-definition.js +++ b/tests/lib/rules/no-shadow-route-definition.js @@ -14,7 +14,7 @@ const { buildErrorMessage } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-side-effects.js b/tests/lib/rules/no-side-effects.js index 89ddd8432d..6777194058 100644 --- a/tests/lib/rules/no-side-effects.js +++ b/tests/lib/rules/no-side-effects.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('no-side-effects', rule, { @@ -50,7 +50,7 @@ eslintTester.run('no-side-effects', rule, { `, parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, @@ -64,7 +64,7 @@ eslintTester.run('no-side-effects', rule, { `, parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, @@ -210,7 +210,7 @@ eslintTester.run('no-side-effects', rule, { errors: [{ message: ERROR_MESSAGE, type: 'CallExpression' }], parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, @@ -227,7 +227,7 @@ eslintTester.run('no-side-effects', rule, { errors: [{ message: ERROR_MESSAGE, type: 'CallExpression' }], parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, @@ -244,7 +244,7 @@ eslintTester.run('no-side-effects', rule, { errors: [{ message: ERROR_MESSAGE, type: 'CallExpression' }], parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-string-prototype-extensions.js b/tests/lib/rules/no-string-prototype-extensions.js index 700b4aa010..405f79a95b 100644 --- a/tests/lib/rules/no-string-prototype-extensions.js +++ b/tests/lib/rules/no-string-prototype-extensions.js @@ -7,7 +7,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('no-string-prototype-extensions', rule, { diff --git a/tests/lib/rules/no-test-and-then.js b/tests/lib/rules/no-test-and-then.js index 5ee38aa711..986dd7f082 100644 --- a/tests/lib/rules/no-test-and-then.js +++ b/tests/lib/rules/no-test-and-then.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-test-import-export.js b/tests/lib/rules/no-test-import-export.js index 9ad0ca93be..9366b844fe 100644 --- a/tests/lib/rules/no-test-import-export.js +++ b/tests/lib/rules/no-test-import-export.js @@ -3,7 +3,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-test-module-for.js b/tests/lib/rules/no-test-module-for.js index c7aca2e9a2..1128a34af2 100644 --- a/tests/lib/rules/no-test-module-for.js +++ b/tests/lib/rules/no-test-module-for.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-test-support-import.js b/tests/lib/rules/no-test-support-import.js index e039a037a0..204bebada1 100644 --- a/tests/lib/rules/no-test-support-import.js +++ b/tests/lib/rules/no-test-support-import.js @@ -3,7 +3,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-test-this-render.js b/tests/lib/rules/no-test-this-render.js index 673ab6f4f5..3374022741 100644 --- a/tests/lib/rules/no-test-this-render.js +++ b/tests/lib/rules/no-test-this-render.js @@ -17,7 +17,7 @@ const TEST_FILE_NAME = 'some-test.js'; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-tracked-properties-from-args.js b/tests/lib/rules/no-tracked-properties-from-args.js index 2bbfb7ea77..ade95d069a 100644 --- a/tests/lib/rules/no-tracked-properties-from-args.js +++ b/tests/lib/rules/no-tracked-properties-from-args.js @@ -12,7 +12,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); @@ -39,7 +39,7 @@ ruleTester.run('no-tracked-properties-from-args', rule, { }`, ` import { tracked } from '@glimmer/tracking' - + class Test { test = 7 }`, @@ -116,7 +116,7 @@ ruleTester.run('no-tracked-properties-from-args', rule, { { code: ` import { tracked as fooTracked } from '@glimmer/tracking'; - + class Test { @fooTracked test = this.args.test } diff --git a/tests/lib/rules/no-try-invoke.js b/tests/lib/rules/no-try-invoke.js index a6c6c7091b..2e7048eb6c 100644 --- a/tests/lib/rules/no-try-invoke.js +++ b/tests/lib/rules/no-try-invoke.js @@ -4,7 +4,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/no-unnecessary-service-injection-argument.js b/tests/lib/rules/no-unnecessary-service-injection-argument.js index 79822b4ceb..f6d1e04201 100644 --- a/tests/lib/rules/no-unnecessary-service-injection-argument.js +++ b/tests/lib/rules/no-unnecessary-service-injection-argument.js @@ -18,7 +18,7 @@ const NEW_SERVICE_IMPORT = "import {service} from '@ember/service';"; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, parser: require.resolve('@babel/eslint-parser'), @@ -35,7 +35,7 @@ ruleTester.run('no-unnecessary-service-injection-argument', rule, { code: `${RENAMED_SERVICE_IMPORT} class Test { @service serviceName }`, parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/no-unused-services.js b/tests/lib/rules/no-unused-services.js index 2f83986334..6cdf113457 100644 --- a/tests/lib/rules/no-unused-services.js +++ b/tests/lib/rules/no-unused-services.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, parser: require.resolve('@babel/eslint-parser'), diff --git a/tests/lib/rules/no-volatile-computed-properties.js b/tests/lib/rules/no-volatile-computed-properties.js index 18446aa84d..6e3afc76d6 100644 --- a/tests/lib/rules/no-volatile-computed-properties.js +++ b/tests/lib/rules/no-volatile-computed-properties.js @@ -12,7 +12,7 @@ const { ERROR_MESSAGE } = rule; // Tests //------------------------------------------------------------------------------ -const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2020, sourceType: 'module' } }); +const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 2022, sourceType: 'module' } }); ruleTester.run('no-volatile-computed-properties', rule, { valid: [ 'computed()', @@ -27,7 +27,7 @@ ruleTester.run('no-volatile-computed-properties', rule, { code: "class Test { @computed('prop') get someProp() {} }", parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, @@ -61,7 +61,7 @@ ruleTester.run('no-volatile-computed-properties', rule, { errors: [{ message: ERROR_MESSAGE, type: 'Identifier' }], parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/order-in-components.js b/tests/lib/rules/order-in-components.js index 8db698438f..e5d02ffbff 100644 --- a/tests/lib/rules/order-in-components.js +++ b/tests/lib/rules/order-in-components.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); @@ -347,7 +347,7 @@ eslintTester.run('order-in-components', rule, { ], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: `export default Component.extend({ @@ -362,7 +362,7 @@ eslintTester.run('order-in-components', rule, { order: ['property', 'actions', 'custom:customProp', 'method'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, ], invalid: [ @@ -971,7 +971,7 @@ eslintTester.run('order-in-components', rule, { bar() { const foo = 'bar'}, onBar: () => {} });`, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -1026,7 +1026,7 @@ eslintTester.run('order-in-components', rule, { order: ['property', 'custom:customProp', 'actions', 'method'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: 'The "customProp" custom property should be above the actions hash on line 3', @@ -1052,7 +1052,7 @@ eslintTester.run('order-in-components', rule, { order: ['method', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: diff --git a/tests/lib/rules/order-in-controllers.js b/tests/lib/rules/order-in-controllers.js index 1a32233ad8..660e73fae1 100644 --- a/tests/lib/rules/order-in-controllers.js +++ b/tests/lib/rules/order-in-controllers.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); @@ -144,7 +144,7 @@ eslintTester.run('order-in-controllers', rule, { order: ['property', 'actions', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, ], invalid: [ @@ -443,7 +443,7 @@ eslintTester.run('order-in-controllers', rule, { }, }); `, - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: @@ -515,7 +515,7 @@ eslintTester.run('order-in-controllers', rule, { order: ['method', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: diff --git a/tests/lib/rules/order-in-models.js b/tests/lib/rules/order-in-models.js index 73a335c5f9..3de0a323fc 100644 --- a/tests/lib/rules/order-in-models.js +++ b/tests/lib/rules/order-in-models.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); @@ -88,7 +88,7 @@ eslintTester.run('order-in-models', rule, { order: ['attribute', 'method', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: `import {inject as service} from '@ember/service'; @@ -100,7 +100,7 @@ eslintTester.run('order-in-models', rule, { customProp: { a: 1 } });`, options: [{ order: ['service', 'attribute', 'method'] }], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, ], invalid: [ @@ -297,7 +297,7 @@ eslintTester.run('order-in-models', rule, { order: ['method', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: diff --git a/tests/lib/rules/order-in-routes.js b/tests/lib/rules/order-in-routes.js index 707e12c2b3..7f2a5b911f 100644 --- a/tests/lib/rules/order-in-routes.js +++ b/tests/lib/rules/order-in-routes.js @@ -10,7 +10,7 @@ const RuleTester = require('eslint').RuleTester; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); @@ -160,7 +160,7 @@ eslintTester.run('order-in-routes', rule, { order: ['property', 'actions', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, ], invalid: [ @@ -776,7 +776,7 @@ eslintTester.run('order-in-routes', rule, { order: ['method', 'custom:customProp'], }, ], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [ { message: diff --git a/tests/lib/rules/prefer-ember-test-helpers.js b/tests/lib/rules/prefer-ember-test-helpers.js index 874f6d022a..1f073a6d52 100644 --- a/tests/lib/rules/prefer-ember-test-helpers.js +++ b/tests/lib/rules/prefer-ember-test-helpers.js @@ -9,7 +9,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/require-computed-macros.js b/tests/lib/rules/require-computed-macros.js index 4bb8032e38..90abfb3e81 100644 --- a/tests/lib/rules/require-computed-macros.js +++ b/tests/lib/rules/require-computed-macros.js @@ -27,7 +27,7 @@ const { const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/require-computed-property-dependencies.js b/tests/lib/rules/require-computed-property-dependencies.js index 59c652f4a7..5ebe23d56a 100644 --- a/tests/lib/rules/require-computed-property-dependencies.js +++ b/tests/lib/rules/require-computed-property-dependencies.js @@ -8,7 +8,7 @@ const { ERROR_MESSAGE_NON_STRING_VALUE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/require-fetch-import.js b/tests/lib/rules/require-fetch-import.js index 28576df2b7..68556f051c 100644 --- a/tests/lib/rules/require-fetch-import.js +++ b/tests/lib/rules/require-fetch-import.js @@ -6,7 +6,7 @@ const RuleTester = require('eslint').RuleTester; const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, env: { browser: true }, }); diff --git a/tests/lib/rules/require-return-from-computed.js b/tests/lib/rules/require-return-from-computed.js index 8122cb73ce..fb2f8bfcc9 100644 --- a/tests/lib/rules/require-return-from-computed.js +++ b/tests/lib/rules/require-return-from-computed.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); eslintTester.run('require-return-from-computed', rule, { @@ -30,7 +30,7 @@ eslintTester.run('require-return-from-computed', rule, { code: 'class Test { @computed() get someProp() {} set someProp(val) {} }', parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/require-super-in-lifecycle-hooks.js b/tests/lib/rules/require-super-in-lifecycle-hooks.js index 02161c98f8..8e6c786867 100644 --- a/tests/lib/rules/require-super-in-lifecycle-hooks.js +++ b/tests/lib/rules/require-super-in-lifecycle-hooks.js @@ -12,7 +12,7 @@ const { ERROR_MESSAGE: message } = rule; // ------------------------------------------------------------------------------ const eslintTester = new RuleTester({ - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, parser: require.resolve('@babel/eslint-parser'), }); @@ -88,7 +88,7 @@ eslintTester.run('require-super-in-lifecycle-hooks', rule, { 'export default Service.extend();', { code: 'export default Service.extend({ ...spread })', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, `export default Component({ init() { diff --git a/tests/lib/rules/require-tagless-components.js b/tests/lib/rules/require-tagless-components.js index 13d5120326..db9eabec5f 100644 --- a/tests/lib/rules/require-tagless-components.js +++ b/tests/lib/rules/require-tagless-components.js @@ -14,7 +14,7 @@ const { ERROR_MESSAGE_REQUIRE_TAGLESS_COMPONENTS: ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true, diff --git a/tests/lib/rules/require-valid-css-selector-in-test-helpers.js b/tests/lib/rules/require-valid-css-selector-in-test-helpers.js index c85289a117..ab8b47e18c 100644 --- a/tests/lib/rules/require-valid-css-selector-in-test-helpers.js +++ b/tests/lib/rules/require-valid-css-selector-in-test-helpers.js @@ -3,7 +3,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, }); diff --git a/tests/lib/rules/route-path-style.js b/tests/lib/rules/route-path-style.js index a90c38f61d..ac7fe41c72 100644 --- a/tests/lib/rules/route-path-style.js +++ b/tests/lib/rules/route-path-style.js @@ -13,7 +13,7 @@ const { ERROR_MESSAGE } = rule; const ruleTester = new RuleTester({ parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', }, parser: require.resolve('@babel/eslint-parser'), diff --git a/tests/lib/rules/template-indent.js b/tests/lib/rules/template-indent.js index b84da8b0ef..563e4b66ca 100644 --- a/tests/lib/rules/template-indent.js +++ b/tests/lib/rules/template-indent.js @@ -11,12 +11,12 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parser: require.resolve('../../../lib/parsers/gjs-gts-parser.js'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); const ruleTesterWithBaseIntent = new RuleTester({ parser: require.resolve('../../../lib/parsers/gjs-gts-parser.js'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, rules: { indent: 'warn', }, diff --git a/tests/lib/rules/template-no-let-reference.js b/tests/lib/rules/template-no-let-reference.js index 7077e9fb90..f031e0f553 100644 --- a/tests/lib/rules/template-no-let-reference.js +++ b/tests/lib/rules/template-no-let-reference.js @@ -11,7 +11,7 @@ const RuleTester = require('eslint').RuleTester; const ruleTester = new RuleTester({ parser: require.resolve('../../../lib/parsers/gjs-gts-parser.js'), - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }); ruleTester.run('template-no-let-reference', rule, { valid: [ diff --git a/tests/lib/rules/use-brace-expansion.js b/tests/lib/rules/use-brace-expansion.js index 3ad47ea1ee..2459b21b46 100644 --- a/tests/lib/rules/use-brace-expansion.js +++ b/tests/lib/rules/use-brace-expansion.js @@ -15,7 +15,7 @@ const { ERROR_MESSAGE } = rule; const eslintTester = new RuleTester({ parser: require.resolve('@babel/eslint-parser'), parserOptions: { - ecmaVersion: 2020, + ecmaVersion: 2022, sourceType: 'module', ecmaFeatures: { legacyDecorators: true }, }, diff --git a/tests/lib/rules/use-ember-data-rfc-395-imports.js b/tests/lib/rules/use-ember-data-rfc-395-imports.js index 15cf50d563..aa7c121260 100644 --- a/tests/lib/rules/use-ember-data-rfc-395-imports.js +++ b/tests/lib/rules/use-ember-data-rfc-395-imports.js @@ -7,7 +7,7 @@ const rule = require('../../../lib/rules/use-ember-data-rfc-395-imports'); const RuleTester = require('eslint').RuleTester; -const parserOptions = { ecmaVersion: 2020, sourceType: 'module' }; +const parserOptions = { ecmaVersion: 2022, sourceType: 'module' }; const { ERROR_MESSAGE: message } = rule; diff --git a/tests/lib/rules/use-ember-get-and-set.js b/tests/lib/rules/use-ember-get-and-set.js index c9c6103864..2ccd8fa976 100644 --- a/tests/lib/rules/use-ember-get-and-set.js +++ b/tests/lib/rules/use-ember-get-and-set.js @@ -38,32 +38,32 @@ eslintTester.run('use-ember-get-and-set', rule, { }, { code: 'import Ember from "ember"; Ember.get(this, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: 'import Ember from "ember"; Ember.set(this, "test", someValue)', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: 'import EmberAlias from "ember"; EmberAlias.get(this, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, // ignoreNonThisExpressions { code: "let a = new Map(); a.set('name', 'Tomster');", options: [{ ignoreNonThisExpressions: true }], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: "let a = new Map(); a.get('myKey')", options: [{ ignoreNonThisExpressions: true }], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, { code: 'this.test("ok")', options: [{ ignoreNonThisExpressions: true }], - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, }, // ignoreThisExpressions @@ -171,99 +171,99 @@ eslintTester.run('use-ember-get-and-set', rule, { { code: 'import Ember from "ember"; const { get } = Ember; this.get("test")', output: 'import Ember from "ember"; const { get } = Ember; get(this, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { get } = Ember; controller.get("test")', output: 'import Ember from "ember"; const { get } = Ember; get(controller, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { get } = Ember; model.get("test")', output: 'import Ember from "ember"; const { get } = Ember; get(model, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { get } = Ember; this.foo.get("test")', output: 'import Ember from "ember"; const { get } = Ember; get(this.foo, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { getWithDefault } = Ember; this.getWithDefault("test", "default")', output: 'import Ember from "ember"; const { getWithDefault } = Ember; getWithDefault(this, "test", "default")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { getWithDefault } = Ember; controller.getWithDefault("test", "default")', output: 'import Ember from "ember"; const { getWithDefault } = Ember; getWithDefault(controller, "test", "default")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { set } = Ember; this.set("test", "value")', output: 'import Ember from "ember"; const { set } = Ember; set(this, "test", "value")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { set } = Ember; controller.set("test", "value")', output: 'import Ember from "ember"; const { set } = Ember; set(controller, "test", "value")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { set } = Ember; model.set("test", "value")', output: 'import Ember from "ember"; const { set } = Ember; set(model, "test", "value")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { getProperties } = Ember; this.getProperties("test", "test2")', output: 'import Ember from "ember"; const { getProperties } = Ember; getProperties(this, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { getProperties } = Ember; controller.getProperties("test", "test2")', output: 'import Ember from "ember"; const { getProperties } = Ember; getProperties(controller, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { getProperties } = Ember; model.getProperties("test", "test2")', output: 'import Ember from "ember"; const { getProperties } = Ember; getProperties(model, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { setProperties } = Ember; this.setProperties({test: "value"})', output: 'import Ember from "ember"; const { setProperties } = Ember; setProperties(this, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { setProperties } = Ember; controller.setProperties({test: "value"})', output: 'import Ember from "ember"; const { setProperties } = Ember; setProperties(controller, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; const { setProperties } = Ember; model.setProperties({test: "value"})', output: 'import Ember from "ember"; const { setProperties } = Ember; setProperties(model, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { @@ -271,7 +271,7 @@ eslintTester.run('use-ember-get-and-set', rule, { code: 'import Ember from "ember"; const { getProperties } = Ember; controller.getProperties("test", "test2")', output: 'import Ember from "ember"; const { getProperties } = Ember; getProperties(controller, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { @@ -279,7 +279,7 @@ eslintTester.run('use-ember-get-and-set', rule, { code: 'import Ember from "ember"; const { setProperties } = Ember; controller.setProperties({test: "value"})', output: 'import Ember from "ember"; const { setProperties } = Ember; setProperties(controller, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { @@ -287,119 +287,119 @@ eslintTester.run('use-ember-get-and-set', rule, { code: 'import Ember from "ember"; const { getWithDefault } = Ember; controller.getWithDefault("test", "default")', output: 'import Ember from "ember"; const { getWithDefault } = Ember; getWithDefault(controller, "test", "default")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, // Fixable errors using method on Ember { code: 'import Ember from "ember"; this.get("test")', output: 'import Ember from "ember"; Ember.get(this, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; controller.get("test")', output: 'import Ember from "ember"; Ember.get(controller, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; model.get("test")', output: 'import Ember from "ember"; Ember.get(model, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; this.foo.get("test")', output: 'import Ember from "ember"; Ember.get(this.foo, "test")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; this.getWithDefault("test", "default")', output: 'import Ember from "ember"; Ember.getWithDefault(this, "test", "default")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; controller.getWithDefault("test", "default")', output: 'import Ember from "ember"; Ember.getWithDefault(controller, "test", "default")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; this.set("test", "value")', output: 'import Ember from "ember"; Ember.set(this, "test", "value")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; controller.set("test", "value")', output: 'import Ember from "ember"; Ember.set(controller, "test", "value")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; model.set("test", "value")', output: 'import Ember from "ember"; Ember.set(model, "test", "value")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; this.getProperties("test", "test2")', output: 'import Ember from "ember"; Ember.getProperties(this, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; controller.getProperties("test", "test2")', output: 'import Ember from "ember"; Ember.getProperties(controller, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; model.getProperties("test", "test2")', output: 'import Ember from "ember"; Ember.getProperties(model, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; this.setProperties({test: "value"})', output: 'import Ember from "ember"; Ember.setProperties(this, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; controller.setProperties({test: "value"})', output: 'import Ember from "ember"; Ember.setProperties(controller, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { code: 'import Ember from "ember"; model.setProperties({test: "value"})', output: 'import Ember from "ember"; Ember.setProperties(model, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { filename: 'app/tests/unit/controllers/controller-test.js', code: 'import Ember from "ember"; controller.getProperties("test", "test2")', output: 'import Ember from "ember"; Ember.getProperties(controller, "test", "test2")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { filename: 'app/tests/unit/controllers/controller-test.js', code: 'import Ember from "ember"; controller.setProperties({test: "value"})', output: 'import Ember from "ember"; Ember.setProperties(controller, {test: "value"})', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], }, { filename: 'app/tests/unit/controllers/controller-test.js', code: 'import Ember from "ember"; controller.getWithDefault("test", "default")', output: 'import Ember from "ember"; Ember.getWithDefault(controller, "test", "default")', - parserOptions: { ecmaVersion: 2020, sourceType: 'module' }, + parserOptions: { ecmaVersion: 2022, sourceType: 'module' }, errors: [{ message: 'Use get/set' }], },