From b9b1b63dc4e3d9077f9beda10374f9a6378c1477 Mon Sep 17 00:00:00 2001 From: Anne-Greeth van Herwijnen Date: Thu, 25 Jul 2024 15:04:57 +0200 Subject: [PATCH] Fix linting --- app/services/store.js | 2 +- lib/content-generator/index.js | 3 +- tests/acceptance/changes-test.js | 48 +++++++++--------- tests/acceptance/index-test.js | 30 +++++------ tests/helpers/features-deprecations.js | 8 +-- .../components/cli-update-commands-test.js | 4 +- .../components/ember-versions-form-test.js | 14 +----- .../list-features-deprecations-test.js | 50 +++++++++---------- tests/unit/adapters/application-test.js | 2 +- tests/unit/models/private/-common-test.js | 4 +- 10 files changed, 78 insertions(+), 87 deletions(-) diff --git a/app/services/store.js b/app/services/store.js index 8356ff9..f41e1d3 100644 --- a/app/services/store.js +++ b/app/services/store.js @@ -1 +1 @@ -export {default} from 'ember-data/store'; +export { default } from 'ember-data/store'; diff --git a/lib/content-generator/index.js b/lib/content-generator/index.js index 5a64531..2fb863f 100644 --- a/lib/content-generator/index.js +++ b/lib/content-generator/index.js @@ -1,6 +1,7 @@ 'use strict'; - +// eslint-disable-next-line n/no-unpublished-require const StaticSiteJson = require('broccoli-static-site-json'); +// eslint-disable-next-line n/no-unpublished-require const MergeTrees = require('broccoli-merge-trees'); const COMMON_CONFIGS = { diff --git a/tests/acceptance/changes-test.js b/tests/acceptance/changes-test.js index 2c72e49..69ea81f 100644 --- a/tests/acceptance/changes-test.js +++ b/tests/acceptance/changes-test.js @@ -11,68 +11,68 @@ module('Acceptance | changes', function (hooks) { // Check new features in Ember.js const newFeaturesInEmberJS = findAll( - '[data-test-package="Ember.js"] [data-test-feature]' + '[data-test-package="Ember.js"] [data-test-feature]', ); assert.strictEqual( newFeaturesInEmberJS.length, 43, - 'We see 43 new features that occurred in Ember.js since version 3.15' + 'We see 43 new features that occurred in Ember.js since version 3.15', ); // Check deprecations in Ember.js const deprecationsInEmberJS = findAll( - '[data-test-package="Ember.js"] [data-test-deprecation]' + '[data-test-package="Ember.js"] [data-test-deprecation]', ); assert.strictEqual( deprecationsInEmberJS.length, 33, - 'We see 33 deprecations that occurred in Ember.js since version 3.15' + 'We see 33 deprecations that occurred in Ember.js since version 3.15', ); // Check new features in Ember Data const newFeaturesInEmberData = findAll( - '[data-test-package="Ember Data"] [data-test-feature]' + '[data-test-package="Ember Data"] [data-test-feature]', ); assert.strictEqual( newFeaturesInEmberData.length, 21, - 'We see 21 new feature that occurred in Ember Data since version 3.15' + 'We see 21 new feature that occurred in Ember Data since version 3.15', ); // Check deprecations in Ember Data const deprecationsInEmberData = findAll( - '[data-test-package="Ember Data"] [data-test-deprecation]' + '[data-test-package="Ember Data"] [data-test-deprecation]', ); assert.strictEqual( deprecationsInEmberData.length, 18, - 'We see 18 deprecations that occurred in Ember Data since version 3.15' + 'We see 18 deprecations that occurred in Ember Data since version 3.15', ); // Check new features in Ember CLI const newFeaturesInEmberCLI = findAll( - '[data-test-package="Ember CLI"] [data-test-feature]' + '[data-test-package="Ember CLI"] [data-test-feature]', ); assert.strictEqual( newFeaturesInEmberCLI.length, 74, - 'We see 74 new features that occurred in Ember CLI since version 3.15' + 'We see 74 new features that occurred in Ember CLI since version 3.15', ); // Check deprecations in Ember CLI const deprecationsInEmberCLI = findAll( - '[data-test-package="Ember CLI"] [data-test-deprecation]' + '[data-test-package="Ember CLI"] [data-test-deprecation]', ); assert.strictEqual( deprecationsInEmberCLI.length, 10, - 'We see 10 deprecations that occurred in Ember CLI since version 3.15' + 'We see 10 deprecations that occurred in Ember CLI since version 3.15', ); }); @@ -81,68 +81,68 @@ module('Acceptance | changes', function (hooks) { // Check new features in Ember.js const newFeaturesInEmberJS = findAll( - '[data-test-package="Ember.js"] [data-test-feature]' + '[data-test-package="Ember.js"] [data-test-feature]', ); assert.strictEqual( newFeaturesInEmberJS.length, 8, - 'We see 8 new features that occurred in Ember.js between 2.17 and 3.3' + 'We see 8 new features that occurred in Ember.js between 2.17 and 3.3', ); // Check deprecations in Ember.js const deprecationsInEmberJS = findAll( - '[data-test-package="Ember.js"] [data-test-deprecation]' + '[data-test-package="Ember.js"] [data-test-deprecation]', ); assert.strictEqual( deprecationsInEmberJS.length, 9, - 'We see 9 deprecations that occurred in Ember.js between 2.17 and 3.3' + 'We see 9 deprecations that occurred in Ember.js between 2.17 and 3.3', ); // Check new features in Ember Data const newFeaturesInEmberData = findAll( - '[data-test-package="Ember Data"] [data-test-feature]' + '[data-test-package="Ember Data"] [data-test-feature]', ); assert.strictEqual( newFeaturesInEmberData.length, 5, - 'We see 5 new features that occurred in Ember Data between 2.17 and 3.3' + 'We see 5 new features that occurred in Ember Data between 2.17 and 3.3', ); // Check deprecations in Ember Data const deprecationsInEmberData = findAll( - '[data-test-package="Ember Data"] [data-test-deprecation]' + '[data-test-package="Ember Data"] [data-test-deprecation]', ); assert.strictEqual( deprecationsInEmberData.length, 1, - 'We see 1 deprecation that occurred in Ember Data between 2.17 and 3.3' + 'We see 1 deprecation that occurred in Ember Data between 2.17 and 3.3', ); // Check new features in Ember CLI const newFeaturesInEmberCLI = findAll( - '[data-test-package="Ember CLI"] [data-test-feature]' + '[data-test-package="Ember CLI"] [data-test-feature]', ); assert.strictEqual( newFeaturesInEmberCLI.length, 2, - 'We see 2 new features that occurred in Ember CLI between 2.17 and 3.3' + 'We see 2 new features that occurred in Ember CLI between 2.17 and 3.3', ); // Check deprecations in Ember CLI const deprecationsInEmberCLI = findAll( - '[data-test-package="Ember CLI"] [data-test-deprecation]' + '[data-test-package="Ember CLI"] [data-test-deprecation]', ); assert.strictEqual( deprecationsInEmberCLI.length, 1, - 'We see 1 deprecation that occurred in Ember CLI between 2.17 and 3.3' + 'We see 1 deprecation that occurred in Ember CLI between 2.17 and 3.3', ); }); diff --git a/tests/acceptance/index-test.js b/tests/acceptance/index-test.js index 72e81d9..ff9f876 100644 --- a/tests/acceptance/index-test.js +++ b/tests/acceptance/index-test.js @@ -35,7 +35,7 @@ module('Acceptance | index', function (hooks) { assert.strictEqual( currentURL(), '/changes?fromVersion=2.17&toVersion=3.3', - 'We see the correct URL.' + 'We see the correct URL.', ); }); @@ -48,16 +48,16 @@ module('Acceptance | index', function (hooks) { // Check Ember.js let features = findAll( - '[data-test-package="Ember.js"] [data-test-feature]' + '[data-test-package="Ember.js"] [data-test-feature]', ); let deprecations = findAll( - '[data-test-package="Ember.js"] [data-test-deprecation]' + '[data-test-package="Ember.js"] [data-test-deprecation]', ); assert.strictEqual( features.length, 8, - 'We see that 8 features were added to Ember.js between 2.17 and 3.3.' + 'We see that 8 features were added to Ember.js between 2.17 and 3.3.', ); assert.isFeatureCorrect(features[0], { @@ -75,7 +75,7 @@ module('Acceptance | index', function (hooks) { assert.strictEqual( deprecations.length, 9, - 'We see that 9 deprecations were added to Ember.js between 2.17 and 3.3.' + 'We see that 9 deprecations were added to Ember.js between 2.17 and 3.3.', ); assert.isDeprecationCorrect(deprecations[0], { @@ -93,13 +93,13 @@ module('Acceptance | index', function (hooks) { // Check Ember Data features = findAll('[data-test-package="Ember Data"] [data-test-feature]'); deprecations = findAll( - '[data-test-package="Ember Data"] [data-test-deprecation]' + '[data-test-package="Ember Data"] [data-test-deprecation]', ); assert.strictEqual( features.length, 5, - 'We see that 5 features were added to Ember Data between 2.17 and 3.3.' + 'We see that 5 features were added to Ember Data between 2.17 and 3.3.', ); assert.isFeatureCorrect(features[0], { @@ -117,7 +117,7 @@ module('Acceptance | index', function (hooks) { assert.strictEqual( deprecations.length, 1, - 'We see that 1 deprecation was added to Ember Data between 2.17 and 3.3.' + 'We see that 1 deprecation was added to Ember Data between 2.17 and 3.3.', ); assert.isDeprecationCorrect(deprecations[0], { @@ -135,13 +135,13 @@ module('Acceptance | index', function (hooks) { // Check Ember CLI features = findAll('[data-test-package="Ember CLI"] [data-test-feature]'); deprecations = findAll( - '[data-test-package="Ember CLI"] [data-test-deprecation]' + '[data-test-package="Ember CLI"] [data-test-deprecation]', ); assert.strictEqual( features.length, 2, - 'We see that 2 features were added to Ember CLI between 2.17 and 3.3.' + 'We see that 2 features were added to Ember CLI between 2.17 and 3.3.', ); assert.isFeatureCorrect(features[0], { @@ -159,7 +159,7 @@ module('Acceptance | index', function (hooks) { assert.strictEqual( deprecations.length, 1, - 'We see that 1 deprecation was added to Ember CLI between 2.17 and 3.3.' + 'We see that 1 deprecation was added to Ember CLI between 2.17 and 3.3.', ); assert.isDeprecationCorrect(deprecations[0], { @@ -184,22 +184,22 @@ module('Acceptance | index', function (hooks) { // Check Ember.js let features = findAll( - '[data-test-package="Ember.js"] [data-test-feature]' + '[data-test-package="Ember.js"] [data-test-feature]', ); let deprecations = findAll( - '[data-test-package="Ember.js"] [data-test-deprecation]' + '[data-test-package="Ember.js"] [data-test-deprecation]', ); assert.strictEqual( features.length, 0, - 'We see that 0 features were added to Ember.js between 3.3 and 2.17.' + 'We see that 0 features were added to Ember.js between 3.3 and 2.17.', ); assert.strictEqual( deprecations.length, 0, - 'We see that 0 deprecations were added to Ember.js between 3.3 and 2.17.' + 'We see that 0 deprecations were added to Ember.js between 3.3 and 2.17.', ); }); diff --git a/tests/helpers/features-deprecations.js b/tests/helpers/features-deprecations.js index 8280bdd..141a478 100644 --- a/tests/helpers/features-deprecations.js +++ b/tests/helpers/features-deprecations.js @@ -16,11 +16,11 @@ function setupCustomAssertions(assert) { .hasAttribute( 'href', link, - 'We see the correct URL for the feature version.' + 'We see the correct URL for the feature version.', ) .hasText( `(${version})`, - 'We see the correct text for the feature version.' + 'We see the correct text for the feature version.', ); }; @@ -36,11 +36,11 @@ function setupCustomAssertions(assert) { .hasAttribute( 'href', link, - 'We see the correct URL for the deprecation version.' + 'We see the correct URL for the deprecation version.', ) .hasText( `(${version})`, - 'We see the correct text for the deprecation version.' + 'We see the correct text for the deprecation version.', ); }; } diff --git a/tests/integration/components/cli-update-commands-test.js b/tests/integration/components/cli-update-commands-test.js index 2e9bcc4..9d99636 100644 --- a/tests/integration/components/cli-update-commands-test.js +++ b/tests/integration/components/cli-update-commands-test.js @@ -19,14 +19,14 @@ module('Integration | Component | cli-update-commands', function (hooks) { .dom('[data-test-command="Ember CLI Update"]') .hasText( 'ember-cli-update --to 3.14', - 'We see the correct command for running ember-cli-update.' + 'We see the correct command for running ember-cli-update.', ); assert .dom('[data-test-command="Run Codemods"]') .hasText( 'ember-cli-update --run-codemods', - 'We see the correct command for running codemods.' + 'We see the correct command for running codemods.', ); }); }); diff --git a/tests/integration/components/ember-versions-form-test.js b/tests/integration/components/ember-versions-form-test.js index cec5c2a..e127a5e 100644 --- a/tests/integration/components/ember-versions-form-test.js +++ b/tests/integration/components/ember-versions-form-test.js @@ -23,19 +23,17 @@ module('Integration | Component | ember-versions-form', function (hooks) { }); test('selecting and changing fromVersion and toVersion', async function (assert) { - assert.expect(2); - this.onSubmit = ({ fromVersion, toVersion }) => { assert.strictEqual( fromVersion, '3.15', - 'We get the correct value for fromVersion.' + 'We get the correct value for fromVersion.', ); assert.strictEqual( toVersion, '3.18', - 'We get the correct value for toVersion.' + 'We get the correct value for toVersion.', ); }; @@ -59,8 +57,6 @@ module('Integration | Component | ember-versions-form', function (hooks) { }); test('Submit button should be enabled initially', async function (assert) { - assert.expect(1); - await render(hbs`