Skip to content

Commit 0a6c9ca

Browse files
author
Pieter
authored
Update ember to v3.28 (#39)
* v3.21.2...v3.28.3 * Fix linting * Fix linting * Add auto-import * Move to CircleCI
1 parent 3510150 commit 0a6c9ca

36 files changed

Lines changed: 4633 additions & 913 deletions

.circleci/config.yml

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
version: 2.1
2+
3+
orbs:
4+
node: circleci/node@4.0.1
5+
6+
defaults: &defaults
7+
docker:
8+
- image: circleci/node:12-browsers
9+
environment:
10+
JOBS: 1
11+
12+
jobs:
13+
prepare:
14+
<<: *defaults
15+
steps:
16+
- checkout
17+
- node/install-packages:
18+
pkg-manager: "yarn"
19+
cache-version: "v1"
20+
include-branch-in-cache-key: false
21+
- run:
22+
name: Generate reports folder
23+
command: mkdir reports
24+
- persist_to_workspace:
25+
root: .
26+
paths:
27+
- .
28+
29+
lint:
30+
<<: *defaults
31+
steps:
32+
- attach_workspace:
33+
at: .
34+
- run:
35+
name: Lint Handlebars
36+
command: yarn lint:hbs
37+
- run:
38+
name: Lint JavaScript
39+
command: yarn lint:js
40+
41+
test:
42+
<<: *defaults
43+
parameters:
44+
scenario:
45+
type: enum
46+
enum:
47+
[
48+
"ember-lts-3.20",
49+
"ember-lts-3.24",
50+
"ember-release",
51+
"ember-beta",
52+
"ember-canary",
53+
"ember-default",
54+
"ember-default-with-jquery",
55+
"ember-classic",
56+
"embroider-safe",
57+
"embroider-optimized"
58+
]
59+
default: "ember-default"
60+
steps:
61+
- attach_workspace:
62+
at: .
63+
- when:
64+
condition:
65+
equal: [ "ember-default", << parameters.scenario >> ]
66+
steps:
67+
- run:
68+
name: Run << parameters.scenario >> Tests
69+
command: yarn test:ember
70+
- when:
71+
condition:
72+
not:
73+
equal: [ "ember-default", << parameters.scenario >> ]
74+
steps:
75+
- run:
76+
name: Run << parameters.scenario >> Tests
77+
command: yarn ember try:one << parameters.scenario >> --skip-cleanup=true
78+
- store_test_results:
79+
path: "reports"
80+
- store_artifacts:
81+
path: "reports"
82+
83+
workflows:
84+
test_matrix:
85+
jobs:
86+
- prepare
87+
- lint:
88+
requires:
89+
- prepare
90+
- test:
91+
requires:
92+
- prepare
93+
- test:
94+
name: test_lts_3_20
95+
scenario: ember-lts-3.20
96+
requires:
97+
- lint
98+
- test
99+
- test:
100+
name: test_lts_3_24
101+
scenario: ember-lts-3.24
102+
requires:
103+
- lint
104+
- test
105+
- test:
106+
name: test_release
107+
scenario: ember-release
108+
requires:
109+
- lint
110+
- test
111+
- test:
112+
name: test_beta
113+
scenario: ember-beta
114+
requires:
115+
- lint
116+
- test
117+
- test:
118+
name: test_canary
119+
scenario: ember-canary
120+
requires:
121+
- lint
122+
- test
123+
- test:
124+
name: test_default_with_jquery
125+
scenario: "ember-default-with-jquery"
126+
requires:
127+
- lint
128+
- test
129+
- test:
130+
name: test_classic
131+
scenario: ember-classic
132+
requires:
133+
- lint
134+
- test
135+
- test:
136+
name: test_embroider_safe
137+
scenario: "embroider-safe"
138+
requires:
139+
- lint
140+
- test
141+
- test:
142+
name: test_embroider_optimized
143+
scenario: "embroider-optimized"
144+
requires:
145+
- lint
146+
- test

.eslintignore

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

1719
# ember-try
1820
/.node_modules.ember-try/

.eslintrc.js

Lines changed: 35 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,55 @@
11
'use strict';
22

33
module.exports = {
4-
root: true,
5-
parser: 'babel-eslint',
4+
root: true,
5+
parser: 'babel-eslint',
66
parserOptions: {
7-
ecmaVersion: 2018,
8-
sourceType: 'module',
7+
ecmaVersion: 2018,
8+
sourceType: 'module',
99
ecmaFeatures: {
10-
legacyDecorators: true
11-
}
10+
legacyDecorators: true,
11+
},
1212
},
13-
globals: {
14-
server: true,
15-
lottie: true,
16-
ActionCable: true
17-
},
18-
extends: ['eslint:recommended', 'plugin:ember-suave/recommended'],
19-
env: {
13+
extends: [
14+
'eslint:recommended',
15+
'plugin:ember/recommended',
16+
'plugin:prettier/recommended',
17+
],
18+
env: {
2019
embertest: true,
21-
browser: true,
22-
es6: true
23-
},
24-
plugins: ['align-assignments', 'arca', 'ember'],
25-
rules: {
26-
'align-assignments/align-assignments': ['warn', { requiresOnly: false }],
27-
'arca/import-align': 'error',
28-
'arca/newline-after-import-section': 'error',
29-
'arca/melted-constructs': 'error',
30-
'arca/import-ordering': 'error',
31-
'array-bracket-spacing': 'off',
32-
camelcase: ['error'],
33-
'ember/no-jquery': 'warn',
34-
'ember/use-ember-data-rfc-395-imports': ['error'],
35-
'ember/new-module-imports': ['error'],
36-
'ember/no-function-prototype-extensions': ['error'],
37-
'ember/no-old-shims': ['error'],
38-
'ember/no-unnecessary-route-path-option': ['error'],
39-
'ember/no-unnecessary-service-injection-argument': ['error'],
40-
'ember/require-computed-macros': ['error'],
41-
42-
'ember/avoid-leaking-state-in-ember-objects': ['warn'],
43-
'ember/computed-property-getters': ['error'],
44-
45-
'ember/jquery-ember-run': ['error'],
46-
'ember/no-arrow-function-computed-properties': ['error'],
47-
'ember/no-capital-letters-in-routes': ['error'],
48-
'ember/no-deeply-nested-dependent-keys-with-each': ['error'],
49-
'ember/no-duplicate-dependent-keys': ['error'],
50-
'ember/no-ember-super-in-es-classes': ['error'],
51-
'ember/no-ember-testing-in-module-scope': ['error'],
52-
'ember/no-incorrect-calls-with-inline-anonymous-functions': ['error'],
53-
'ember/no-invalid-debug-function-arguments': ['error'],
54-
'ember/no-side-effects': ['warn'],
55-
'ember/require-super-in-init': ['error'],
56-
'ember/require-computed-property-dependencies': ['error'],
57-
'ember/use-brace-expansion': ['warn'],
58-
59-
'object-curly-spacing': ['error', 'always'],
60-
61-
'no-console': ['error', { allow: ['error'] }],
62-
quotes: ['error', 'single', { allowTemplateLiterals: true }],
63-
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
64-
indent: [
65-
'error',
66-
2,
67-
{
68-
FunctionExpression: { body: 1, parameters: 'first' },
69-
FunctionDeclaration: { body: 1, parameters: 'first' },
70-
CallExpression: { arguments: 'off' },
71-
MemberExpression: 'off',
72-
ObjectExpression: 'off',
73-
ImportDeclaration: 'first',
74-
ArrayExpression: 'first',
75-
ignoredNodes: ['ConditionalExpression']
76-
}
77-
],
78-
'key-spacing': [
79-
'error',
80-
{
81-
multiLine: { beforeColon: false },
82-
align: { beforeColon: false, on: 'value' }
83-
}
84-
],
85-
'max-len': ['error', { code: 90, ignorePattern: '^\\s*(import|test)' }],
86-
87-
// 'multiline-ternary': ['error', 'never'],
88-
'max-statements-per-line': 'off',
89-
'new-cap': 'off',
90-
'operator-linebreak': 'off'
20+
browser: true,
21+
es6: true,
9122
},
23+
plugins: ['ember'],
24+
rules: {},
9225
overrides: [
9326
// node files
9427
{
9528
files: [
96-
'.eslintrc.js',
97-
'.template-lintrc.js',
98-
'ember-cli-build.js',
99-
'testem.js',
100-
'blueprints/*/index.js',
101-
'config/**/*.js',
102-
'lib/*/index.js',
103-
'server/**/*.js'
29+
'./.eslintrc.js',
30+
'./.prettierrc.js',
31+
'./.template-lintrc.js',
32+
'./ember-cli-build.js',
33+
'./index.js',
34+
'./testem.js',
35+
'./blueprints/*/index.js',
36+
'./config/**/*.js',
37+
'./tests/dummy/config/**/*.js',
10438
],
10539
parserOptions: {
106-
sourceType: 'script'
40+
sourceType: 'script',
10741
},
10842
env: {
10943
browser: false,
110-
node: true
44+
node: true,
11145
},
11246
plugins: ['node'],
113-
rules: Object.assign(
114-
{},
115-
require('eslint-plugin-node').configs.recommended.rules,
116-
{
117-
// add your custom rules and overrides for node files here
118-
119-
// this can be removed once the following is fixed
120-
// https://github.com/mysticatea/eslint-plugin-node/issues/77
121-
'node/no-unpublished-require': 'off'
122-
}
123-
)
124-
}
125-
]
47+
extends: ['plugin:node/recommended'],
48+
},
49+
{
50+
// Test files:
51+
files: ['tests/**/*-test.{js,ts}'],
52+
extends: ['plugin:qunit/recommended'],
53+
},
54+
],
12655
};

.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

.npmignore

Lines changed: 4 additions & 0 deletions
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
@@ -23,6 +26,7 @@
2326
/ember-cli-build.js
2427
/testem.js
2528
/tests/
29+
/yarn-error.log
2630
/yarn.lock
2731
.gitkeep
2832

.prettierignore

Lines changed: 21 additions & 0 deletions
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

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
'use strict';
22

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

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ jobs:
4646

4747
# we recommend new addons test the current and previous LTS
4848
# as well as latest stable release (bonus points to beta/canary)
49-
- env: EMBER_TRY_SCENARIO=ember-lts-3.16
5049
- env: EMBER_TRY_SCENARIO=ember-lts-3.20
50+
- env: EMBER_TRY_SCENARIO=ember-lts-3.24
5151
- env: EMBER_TRY_SCENARIO=ember-release
5252
- env: EMBER_TRY_SCENARIO=ember-beta
5353
- env: EMBER_TRY_SCENARIO=ember-canary
5454
- env: EMBER_TRY_SCENARIO=ember-default-with-jquery
5555
- env: EMBER_TRY_SCENARIO=ember-classic
56+
- env: EMBER_TRY_SCENARIO=embroider-safe
57+
- env: EMBER_TRY_SCENARIO=embroider-optimized
5658

5759
before_install:
5860
- curl -o- -L https://yarnpkg.com/install.sh | bash

0 commit comments

Comments
 (0)