Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency prettier to v3 #714

Merged
merged 2 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions addon/addon/components/mobile-menu-wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default class MobileMenuWrapper extends Component {
registerChild(component) {
assert(
'component was already registered as a child',
!this.children.has(component)
!this.children.has(component),
);

this.children.add(component);
Expand Down Expand Up @@ -372,7 +372,7 @@ export default class MobileMenuWrapper extends Component {
menu,
targetPosition = 'open',
currentVelocity = 0,
animate = true
animate = true,
) {
const fromValue = this.position;
const toValue =
Expand Down
4 changes: 2 additions & 2 deletions addon/addon/components/mobile-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ export default class MobileMenu extends Component {

assert(
'register function argument not passed. You should not be using <MobileMenu/> directly.',
typeof this.args.register === 'function'
typeof this.args.register === 'function',
);
assert(
'unregister function argument not passed. You should not be using <MobileMenu/> directly.',
typeof this.args.unregister === 'function'
typeof this.args.unregister === 'function',
);

if (this.args.parent?.isFastBoot && this.args.isOpen) {
Expand Down
2 changes: 1 addition & 1 deletion addon/compile-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const inputFile = path.join(
__dirname,
'app',
'styles',
'ember-mobile-menu.scss'
'ember-mobile-menu.scss',
);
const outputFile = path.join(__dirname, 'vendor', 'ember-mobile-menu.css');

Expand Down
4 changes: 2 additions & 2 deletions addon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"eslint-config-prettier": "9.0.0",
"eslint-plugin-ember": "11.11.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-qunit": "8.0.1",
"npm-run-all": "4.1.5",
"prettier": "2.8.8",
"prettier": "3.0.3",
"sass": "1.69.4",
"webpack": "5.89.0"
},
Expand Down
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
"eslint-config-prettier": "9.0.0",
"eslint-plugin-ember": "11.11.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-qunit": "8.0.1",
"loader.js": "4.7.0",
"npm-run-all": "4.1.5",
"prettier": "2.8.8",
"prettier": "3.0.3",
"qunit": "2.20.0",
"qunit-dom": "3.0.0",
"sass": "1.69.4",
Expand Down
66 changes: 48 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@
"eslint-config-prettier": "9.0.0",
"eslint-plugin-ember": "11.11.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-qunit": "8.0.1",
"loader.js": "4.7.0",
"npm-run-all": "4.1.5",
"prettier": "2.8.8",
"prettier": "3.0.3",
"qunit": "2.20.0",
"qunit-dom": "3.0.0",
"sass": "1.69.4",
Expand Down
10 changes: 5 additions & 5 deletions test-app/tests/integration/components/mobile-menu-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module('Integration | Component | mobile-menu', function (hooks) {

test('it renders', async function (assert) {
await render(
hbs`<MobileMenu @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`
hbs`<MobileMenu @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`,
);

assert.strictEqual(this.element.textContent.trim(), '');
Expand All @@ -31,28 +31,28 @@ module('Integration | Component | mobile-menu', function (hooks) {

test('it is a left menu by default', async function (assert) {
await render(
hbs`<MobileMenu @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`
hbs`<MobileMenu @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`,
);
assert.dom('.mobile-menu').hasClass('mobile-menu--left');
});

test(`it is a right menu if type is 'right'`, async function (assert) {
await render(
hbs`<MobileMenu @type="right" @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`
hbs`<MobileMenu @type="right" @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`,
);
assert.dom('.mobile-menu').hasClass('mobile-menu--right');
});

test(`it adds a mask by default`, async function (assert) {
await render(
hbs`<MobileMenu @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`
hbs`<MobileMenu @register={{this.register}} @unregister={{this.unregister}} @parentBoundingClientRect={{this.emptyObject}}/>`,
);
assert.dom('.mobile-menu__mask').exists({ count: 1 });
});

test(`it doesn't add a mask by if maskEnabled=false`, async function (assert) {
await render(
hbs`<MobileMenu @maskEnabled={{false}} @register={{this.register}} @unregister={{this.unregister}}/> @parentBoundingClientRect={{hash}}`
hbs`<MobileMenu @maskEnabled={{false}} @register={{this.register}} @unregister={{this.unregister}}/> @parentBoundingClientRect={{hash}}`,
);
assert.dom('.mobile-menu__mask').doesNotExist();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ module('Integration | Component | mobile-menu-toggle', function (hooks) {
};

await render(
hbs`<MobileMenuToggle @target="right" @onClick={{this.handleClick}}/>`
hbs`<MobileMenuToggle @target="right" @onClick={{this.handleClick}}/>`,
);
await click('.mobile-menu__toggle');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ module('Integration | Component | mobile-menu-wrapper', function (hooks) {

await pan(
'.mobile-menu-wrapper--embedded .mobile-menu-wrapper__content',
'right'
'right',
);
await settled();

Expand Down Expand Up @@ -314,7 +314,7 @@ module('Integration | Component | mobile-menu-wrapper', function (hooks) {

await pan(
'.mobile-menu-wrapper--embedded .mobile-menu-wrapper__content',
'left'
'left',
);
await settled();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module('Integration | Component | mobile-menu/tray', function (hooks) {
this.set('isClosed', true);

await render(
hbs`{{#if this.showMenu}}<MobileMenu::Tray @preventScroll={{true}} @embed={{false}} @isClosed={{this.isClosed}}/>{{/if}}`
hbs`{{#if this.showMenu}}<MobileMenu::Tray @preventScroll={{true}} @embed={{false}} @isClosed={{this.isClosed}}/>{{/if}}`,
);
assert.strictEqual(document.body.style.overflow, '');

Expand Down