Skip to content

Commit 93e1b1b

Browse files
authored
Update ember-source to v3.25 (#81)
* Updated development dependencies to their latest version * Addressed an accessibility issue (missing label) * Updated ember-source to v3.25.4 * Specified which files to lint * Ran Prettier * Updated linting instructions Co-authored-by: Isaac Lee <[email protected]>
1 parent b911647 commit 93e1b1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1373
-621
lines changed

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,12 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.eslintcache
1617

1718
# ember-try
1819
/.node_modules.ember-try/
1920
/bower.json.ember-try
2021
/package.json.ember-try
22+
23+
# Ignore code examples for the cheat sheet
24+
/snippets/

.eslintrc.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,47 +7,47 @@ module.exports = {
77
ecmaVersion: 2018,
88
sourceType: 'module',
99
ecmaFeatures: {
10-
legacyDecorators: true
11-
}
10+
legacyDecorators: true,
11+
},
1212
},
13-
plugins: [
14-
'ember'
15-
],
13+
plugins: ['ember'],
1614
extends: [
1715
'eslint:recommended',
18-
'plugin:ember/recommended'
16+
'plugin:ember/recommended',
17+
'plugin:prettier/recommended',
1918
],
2019
env: {
21-
browser: true
20+
browser: true,
2221
},
2322
rules: {},
2423
overrides: [
2524
// node files
2625
{
2726
files: [
2827
'.eslintrc.js',
28+
'.prettierrc.js',
2929
'.template-lintrc.js',
3030
'ember-cli-build.js',
3131
'testem.js',
3232
'blueprints/*/index.js',
3333
'config/**/*.js',
3434
'lib/*/index.js',
35-
'server/**/*.js'
35+
'server/**/*.js',
3636
],
3737
parserOptions: {
38-
sourceType: 'script'
38+
sourceType: 'script',
3939
},
4040
env: {
4141
browser: false,
42-
node: true
42+
node: true,
4343
},
4444
plugins: ['node'],
4545
extends: ['plugin:node/recommended'],
4646
rules: {
4747
// this can be removed once the following is fixed
4848
// https://github.com/mysticatea/eslint-plugin-node/issues/77
49-
'node/no-unpublished-require': 'off'
50-
}
51-
}
52-
]
49+
'node/no-unpublished-require': 'off',
50+
},
51+
},
52+
],
5353
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
/.env*
1313
/.pnp*
1414
/.sass-cache
15+
/.eslintcache
1516
/connect.lock
1617
/coverage/
1718
/libpeerconnection.log

.prettierignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# unconventional js
2+
/blueprints/*/files/
3+
/vendor/
4+
5+
# compiled output
6+
/dist/
7+
/tmp/
8+
9+
# dependencies
10+
/bower_components/
11+
/node_modules/
12+
13+
# misc
14+
/coverage/
15+
!.*
16+
.eslintcache
17+
18+
# ember-try
19+
/.node_modules.ember-try/
20+
/bower.json.ember-try
21+
/package.json.ember-try
22+
23+
# Ignore code examples for the cheat sheet
24+
/snippets/

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
singleQuote: true,
5+
};

.template-lintrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
module.exports = {
44
extends: 'octane',
55
rules: {
6-
'no-bare-strings': true
7-
}
6+
'no-bare-strings': true,
7+
},
88
};

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ yarn lint
2424
yarn test
2525
```
2626

27+
To fix linting errors, try the following command:
28+
29+
```bash
30+
yarn lint:fix
31+
```
32+
2733

2834
## Continuous deployment
2935

app/components/locale-menu/template.hbs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1+
<label for="locale-menu">
2+
{{t "component.locale-menu.locale-select.label"}}
3+
</label>
4+
15
<select
26
class="locale-menu"
37
data-test-field="Locale"
8+
id="locale-menu"
49
{{on "input" this.updateLocale}}
510
>
611
<option value="" disabled selected>
7-
{{t "component.locale-menu.select-your-preferred-language"}}
12+
{{t "component.locale-menu.locale-select.placeholder"}}
813
</option>
914

1015
{{#each this.locale.menuOptions as |menuOption|}}

app/controllers/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import config from 'ember-octane-vs-classic-cheat-sheet/config/environment';
33

44
export default class ApplicationController extends Controller {
55
rootURL = config.rootURL.replace(/\/$/, '');
6-
}
6+
}

app/formats.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ export default {
33
hhmmss: {
44
hour: 'numeric',
55
minute: 'numeric',
6-
second: 'numeric'
7-
}
6+
second: 'numeric',
7+
},
88
},
99
date: {
1010
hhmmss: {
1111
hour: 'numeric',
1212
minute: 'numeric',
13-
second: 'numeric'
14-
}
13+
second: 'numeric',
14+
},
1515
},
1616
number: {
1717
EUR: {
1818
style: 'currency',
1919
currency: 'EUR',
2020
minimumFractionDigits: 2,
21-
maximumFractionDigits: 2
21+
maximumFractionDigits: 2,
2222
},
2323
USD: {
2424
style: 'currency',
2525
currency: 'USD',
2626
minimumFractionDigits: 2,
27-
maximumFractionDigits: 2
28-
}
29-
}
27+
maximumFractionDigits: 2,
28+
},
29+
},
3030
};

app/helpers/get-prism-language.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ import { helper } from '@ember/component/helper';
22

33
const mapLangugage = {
44
shell: 'bash',
5-
text: 'markup'
5+
text: 'markup',
66
};
77

88
// Convert the Ember Code Snippet language if needed
99
export default helper(function getPrismLanguage(params) {
1010
const emberCodeSnippetLanguage = params[0];
1111

12-
if (Object.prototype.hasOwnProperty.call(mapLangugage, emberCodeSnippetLanguage)) {
12+
if (
13+
Object.prototype.hasOwnProperty.call(mapLangugage, emberCodeSnippetLanguage)
14+
) {
1315
return mapLangugage[emberCodeSnippetLanguage];
1416
}
1517

1618
return emberCodeSnippetLanguage;
17-
});
19+
});

app/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<head>
44
<meta charset="utf-8">
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<title>Ember.js Octane vs Classic Cheat Sheet</title>
76
<meta name="description" content="See side-by-side examples of Ember Octane and Ember Classic">
87
<meta name="viewport" content="width=device-width, initial-scale=1">
98

app/router.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ export default class Router extends EmberRouter {
66
rootURL = config.rootURL;
77
}
88

9-
Router.map(function() {
10-
});
9+
Router.map(function () {});

0 commit comments

Comments
 (0)