Skip to content

Commit c0352d5

Browse files
committed
fix: update prettier to allow optional chaining
Current version of prettier complains about optional chaining with ``` Parsing error: Expression expected ``` See prettier/prettier#7088 This prevents the last commit from passing the test suite The suggested fix of upgrading prettier fixes this issue. After upgrading ran `yarn eslint --ext js,ts --fix .` to fix new linting errors.
1 parent cb7aea1 commit c0352d5

File tree

23 files changed

+82
-82
lines changed

23 files changed

+82
-82
lines changed

config/deploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-env node */
22
'use strict';
33

4-
module.exports = function(deployTarget) {
4+
module.exports = function (deployTarget) {
55
let ENV = {
66
build: {},
77
// include other plugin configuration that applies to all deploy targets here

config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

3-
module.exports = function(/* environment, appConfig */) {
3+
module.exports = function (/* environment, appConfig */) {
44
return {};
55
};

ember-cli-build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
44

5-
module.exports = function(defaults) {
5+
module.exports = function (defaults) {
66
let app = new EmberAddon(defaults, {
77
'ember-cli-babel': {
88
throwUnlessParallelizable: true,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
"in-repo-b": "link:tests/dummy/lib/in-repo-b",
127127
"loader.js": "4.7.0",
128128
"mocha": "7.1.0",
129-
"prettier": "1.18.2",
129+
"prettier": "2.0.5",
130130
"prettier-eslint": "9.0.1",
131131
"qunit-dom": "1.1.0",
132132
"testdouble": "3.13.0",

tests/dummy/app/router.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ const Router = AddonDocsRouter.extend({
66
rootURL: config.rootURL,
77
});
88

9-
Router.map(function() {
10-
docsRoute(this, function() {
9+
Router.map(function () {
10+
docsRoute(this, function () {
1111
this.route('upgrade-notes');
1212
this.route('configuration');
13-
this.route('ts-guide', function() {
13+
this.route('ts-guide', function () {
1414
this.route('with-addons');
1515
this.route('using-ts-effectively');
1616
this.route('current-limitations');
1717
});
18-
this.route('troubleshooting', function() {
18+
this.route('troubleshooting', function () {
1919
this.route('conflicting-types');
2020
});
21-
this.route('type-defs', function() {
21+
this.route('type-defs', function () {
2222
this.route('package-names');
2323
});
2424
});

tests/dummy/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
module.exports = function(environment) {
3+
module.exports = function (environment) {
44
let ENV = {
55
modulePrefix: 'dummy',
66
environment,

tests/integration/components/js-importing-ts-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit';
33
import { render } from '@ember/test-helpers';
44
import hbs from 'htmlbars-inline-precompile';
55

6-
module('Integration | Component | js importing ts', function(hooks) {
6+
module('Integration | Component | js importing ts', function (hooks) {
77
setupRenderingTest(hooks);
88

9-
test('it renders', async function(assert) {
9+
test('it renders', async function (assert) {
1010
// Set any properties with this.set('myProperty', 'value');
1111
// Handle any actions with this.on('myAction', function(val) { ... });
1212

tests/integration/components/ts-component-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit';
33
import { render } from '@ember/test-helpers';
44
import hbs from 'htmlbars-inline-precompile';
55

6-
module('Integration | Component | ts component', function(hooks) {
6+
module('Integration | Component | ts component', function (hooks) {
77
setupRenderingTest(hooks);
88

9-
test('it renders', async function(assert) {
9+
test('it renders', async function (assert) {
1010
// Set any properties with this.set('myProperty', 'value');
1111
// Handle any actions with this.on('myAction', function(val) { ... });
1212

tests/unit/build-test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,28 @@ import fileB from 'dummy/b';
77
import { description as fromAts } from 'in-repo-a/test-support/from-ats';
88
import { description as fromTs } from 'dummy/tests/from-ts';
99

10-
module('Unit | Build', function() {
11-
test("in-repo addons' addon trees wind up in the right place", function(assert) {
10+
module('Unit | Build', function () {
11+
test("in-repo addons' addon trees wind up in the right place", function (assert) {
1212
assert.equal(addonFileA, 'in-repo-a/test-file');
1313
assert.equal(addonFileB, 'in-repo-b/test-file');
1414
});
1515

16-
test("in-repo addons' app trees wind up in the right place", function(assert) {
16+
test("in-repo addons' app trees wind up in the right place", function (assert) {
1717
assert.equal(fileA, 'dummy/a');
1818
assert.equal(fileB, 'dummy/b');
1919
});
2020

21-
test("addon's addon-test-support files end up in <addon-name>/test-support/*", function(assert) {
21+
test("addon's addon-test-support files end up in <addon-name>/test-support/*", function (assert) {
2222
assert.ok(fromAts);
2323
assert.equal(fromAts, 'From addon-test-support');
2424
});
2525

26-
test("addon's test-support files end up in dummy/tests/*", function(assert) {
26+
test("addon's test-support files end up in dummy/tests/*", function (assert) {
2727
assert.ok(fromTs);
2828
assert.equal(fromTs, 'From test-support');
2929
});
3030

31-
test('property initialization occurs in the right order', function(assert) {
31+
test('property initialization occurs in the right order', function (assert) {
3232
class TestClass {
3333
// we shouldn't encourage folks to write code like this, but tsc ensures
3434
// that constructor param fields are set before field initializers run

tests/unit/helpers/js-help-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { jsHelp } from 'dummy/helpers/js-help';
22
import { module, test } from 'qunit';
33

4-
module('Unit | Helper | js help', function() {
4+
module('Unit | Helper | js help', function () {
55
// Replace this with your real tests.
6-
test('it works', function(assert) {
6+
test('it works', function (assert) {
77
let result = jsHelp([42]);
88
assert.ok(result);
99
});

0 commit comments

Comments
 (0)