Skip to content

Commit ca083e2

Browse files
committed
Update to Ember 3.26.1 blueprint; fix deprecations
1 parent 448f8b0 commit ca083e2

39 files changed

+1242
-876
lines changed

.bowerrc

-4
This file was deleted.

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# misc
1414
/coverage/
1515
!.*
16+
.eslintcache
1617

1718
# ember-try
1819
/.node_modules.ember-try/

.eslintrc.js

+14-14
Original file line numberDiff line numberDiff line change
@@ -7,48 +7,48 @@ 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
'index.js',
3232
'testem.js',
3333
'blueprints/*/index.js',
3434
'config/**/*.js',
35-
'tests/dummy/config/**/*.js'
35+
'tests/dummy/config/**/*.js',
3636
],
3737
excludedFiles: [
3838
'addon/**',
3939
'addon-test-support/**',
4040
'app/**',
41-
'tests/dummy/app/**'
41+
'tests/dummy/app/**',
4242
],
4343
parserOptions: {
44-
sourceType: 'script'
44+
sourceType: 'script',
4545
},
4646
env: {
4747
browser: false,
48-
node: true
48+
node: true,
4949
},
5050
plugins: ['node'],
51-
extends: ['plugin:node/recommended']
52-
}
53-
]
51+
extends: ['plugin:node/recommended'],
52+
},
53+
],
5454
};

.gitignore

+1
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

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
/.editorconfig
1111
/.ember-cli
1212
/.env*
13+
/.eslintcache
1314
/.eslintignore
1415
/.eslintrc.js
1516
/.git/
1617
/.gitignore
18+
/.prettierignore
19+
/.prettierrc.js
1720
/.template-lintrc.js
1821
/.travis.yml
1922
/.watchmanconfig

.prettierignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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

.prettierrc.js

+5
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

33
module.exports = {
4-
extends: 'octane'
4+
extends: 'octane',
55
};

CONTRIBUTING.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88

99
## Linting
1010

11-
* `yarn lint:hbs`
12-
* `yarn lint:js`
13-
* `yarn lint:js -- --fix`
11+
* `yarn lint`
12+
* `yarn lint:fix`
1413

1514
## Running tests
1615

addon/index.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
1-
import {
2-
Inflector,
3-
defaultRules,
4-
pluralize,
5-
singularize
6-
} from "./lib/system";
1+
import { Inflector, defaultRules, pluralize, singularize } from './lib/system';
72

83
export default Inflector;
94

10-
export {
11-
pluralize,
12-
singularize,
13-
defaultRules
14-
};
5+
export { pluralize, singularize, defaultRules };

addon/lib/helpers/pluralize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default makeHelper(function (params, hash) {
2222
let fullParams = new Array(...params);
2323

2424
if (fullParams.length === 2) {
25-
fullParams.push({ withoutCount: hash["without-count"] })
25+
fullParams.push({ withoutCount: hash['without-count'] });
2626
}
2727

2828
return pluralize(...fullParams);

addon/lib/helpers/singularize.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import makeHelper from '../utils/make-helper';
1414
* @for Ember.HTMLBars.helpers
1515
* @method singularize
1616
* @param {String|Property} word word to singularize
17-
*/
17+
*/
1818
export default makeHelper(function (params) {
1919
return singularize(params[0]);
2020
});

addon/lib/system.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import Inflector from "./system/inflector";
2-
import {
3-
pluralize,
4-
singularize
5-
} from "./system/string";
6-
7-
export {
8-
Inflector,
9-
singularize,
10-
pluralize
11-
};
1+
import Inflector from './system/inflector';
2+
import { pluralize, singularize } from './system/string';
3+
4+
export { Inflector, singularize, pluralize };

addon/lib/system/inflections.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@ export default {
2020
[/^(m|l)ice$/i, '$1ice'],
2121
[/^(ox)$/i, '$1en'],
2222
[/^(oxen)$/i, '$1'],
23-
[/(quiz)$/i, '$1zes']
23+
[/(quiz)$/i, '$1zes'],
2424
],
2525

2626
singular: [
2727
[/s$/i, ''],
2828
[/(ss)$/i, '$1'],
2929
[/(n)ews$/i, '$1ews'],
3030
[/([ti])a$/i, '$1um'],
31-
[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i, '$1sis'],
31+
[
32+
/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(sis|ses)$/i,
33+
'$1sis',
34+
],
3235
[/(^analy)(sis|ses)$/i, '$1sis'],
3336
[/([^f])ves$/i, '$1fe'],
3437
[/(hive)s$/i, '$1'],
@@ -50,7 +53,7 @@ export default {
5053
[/(vert|ind)ices$/i, '$1ex'],
5154
[/(matr)ices$/i, '$1ix'],
5255
[/(quiz)zes$/i, '$1'],
53-
[/(database)s$/i, '$1']
56+
[/(database)s$/i, '$1'],
5457
],
5558

5659
irregularPairs: [
@@ -60,7 +63,7 @@ export default {
6063
['sex', 'sexes'],
6164
['move', 'moves'],
6265
['cow', 'kine'],
63-
['zombie', 'zombies']
66+
['zombie', 'zombies'],
6467
],
6568

6669
uncountable: [
@@ -73,6 +76,6 @@ export default {
7376
'fish',
7477
'sheep',
7578
'jeans',
76-
'police'
77-
]
79+
'police',
80+
],
7881
};

0 commit comments

Comments
 (0)