Skip to content

Commit 86e0bc7

Browse files
authored
Merge pull request #772 from ember-animation/sync-addon-blueprint
run `npx ember-cli-update` to align with addon blueprint
2 parents 40e5753 + b4209cc commit 86e0bc7

26 files changed

+959
-858
lines changed

.github/workflows/push-dist.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ jobs:
1515
push-dist:
1616
name: Push dist
1717
runs-on: ubuntu-latest
18+
timeout-minutes: 10
19+
1820
steps:
1921
- uses: actions/checkout@v4
2022
- uses: pnpm/action-setup@v4

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ auto-install-peers=false
77
# we want true isolation,
88
# if a dependency is not declared, we want an error
99
resolve-peers-from-workspace-root=false
10+
11+
hoist-pattern[]=*
12+
hoist-pattern[]=!@types/ember*

addon/.eslintignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

addon/.eslintrc.cjs

Lines changed: 0 additions & 61 deletions
This file was deleted.

addon/.prettierrc.cjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
module.exports = {
44
plugins: ['prettier-plugin-ember-template-tag'],
5-
singleQuote: true,
6-
trailingComma: 'all',
5+
overrides: [
6+
{
7+
files: '*.{js,gjs,ts,gts,mjs,mts,cjs,cts}',
8+
options: {
9+
singleQuote: true,
10+
templateSingleQuote: false,
11+
},
12+
},
13+
],
714
};

addon/babel.config.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
{
22
"plugins": [
3-
["@babel/plugin-transform-typescript", { "allExtensions": true, "onlyRemoveTypeImports": true, "allowDeclareFields": true }],
3+
[
4+
"@babel/plugin-transform-typescript",
5+
{
6+
"allExtensions": true,
7+
"onlyRemoveTypeImports": true,
8+
"allowDeclareFields": true
9+
}
10+
],
411
"@embroider/addon-dev/template-colocation-plugin",
5-
["babel-plugin-ember-template-compilation", {
6-
"targetFormat": "hbs",
7-
"transforms": []
8-
}],
9-
["module:decorator-transforms", { "runtime": { "import": "decorator-transforms/runtime" } }]
12+
[
13+
"babel-plugin-ember-template-compilation",
14+
{
15+
"targetFormat": "hbs",
16+
"transforms": []
17+
}
18+
],
19+
[
20+
"module:decorator-transforms",
21+
{ "runtime": { "import": "decorator-transforms/runtime" } }
22+
]
1023
]
1124
}

addon/eslint.config.mjs

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
/**
2+
* Debugging:
3+
* https://eslint.org/docs/latest/use/configure/debug
4+
* ----------------------------------------------------
5+
*
6+
* Print a file's calculated configuration
7+
*
8+
* npx eslint --print-config path/to/file.js
9+
*
10+
* Inspecting the config
11+
*
12+
* npx eslint --inspect-config
13+
*
14+
*/
15+
import babelParser from '@babel/eslint-parser';
16+
import js from '@eslint/js';
17+
import prettier from 'eslint-config-prettier';
18+
import ember from 'eslint-plugin-ember/recommended';
19+
import importPlugin from 'eslint-plugin-import';
20+
import n from 'eslint-plugin-n';
21+
import globals from 'globals';
22+
import ts from 'typescript-eslint';
23+
24+
const parserOptions = {
25+
esm: {
26+
js: {
27+
ecmaFeatures: { modules: true },
28+
ecmaVersion: 'latest',
29+
},
30+
ts: {
31+
projectService: true,
32+
project: true,
33+
tsconfigRootDir: import.meta.dirname,
34+
},
35+
},
36+
};
37+
38+
const disabledRules = {
39+
'@typescript-eslint/no-explicit-any': 'off',
40+
'prefer-const': 'off',
41+
42+
'ember/classic-decorator-no-classic-methods': 'off',
43+
'ember/no-classic-components': 'off',
44+
'ember/no-component-lifecycle-hooks': 'off',
45+
'ember/no-computed-properties-in-native-classes': 'off',
46+
'ember/no-get': 'off',
47+
'ember/no-observers': 'off',
48+
'ember/no-runloop': 'off',
49+
'ember/require-tagless-components': 'off',
50+
};
51+
52+
export default ts.config(
53+
js.configs.recommended,
54+
ember.configs.base,
55+
ember.configs.gjs,
56+
ember.configs.gts,
57+
prettier,
58+
/**
59+
* Ignores must be in their own object
60+
* https://eslint.org/docs/latest/use/configure/ignore
61+
*/
62+
{
63+
ignores: ['dist/', 'declarations/', 'node_modules/', 'coverage/', '!**/.*'],
64+
},
65+
/**
66+
* https://eslint.org/docs/latest/use/configure/configuration-files#configuring-linter-options
67+
*/
68+
{
69+
linterOptions: {
70+
reportUnusedDisableDirectives: 'error',
71+
},
72+
},
73+
{
74+
files: ['**/*.js'],
75+
languageOptions: {
76+
parser: babelParser,
77+
},
78+
},
79+
{
80+
files: ['**/*.{js,gjs}'],
81+
languageOptions: {
82+
parserOptions: parserOptions.esm.js,
83+
globals: {
84+
...globals.browser,
85+
},
86+
},
87+
rules: {
88+
...disabledRules,
89+
},
90+
},
91+
{
92+
files: ['**/*.{ts,gts}'],
93+
languageOptions: {
94+
parser: ember.parser,
95+
parserOptions: parserOptions.esm.ts,
96+
},
97+
extends: [...ts.configs.recommended, ember.configs.gts],
98+
rules: {
99+
...disabledRules,
100+
},
101+
},
102+
{
103+
files: ['src/**/*'],
104+
plugins: {
105+
import: importPlugin,
106+
},
107+
rules: {
108+
// require relative imports use full extensions
109+
'import/extensions': ['error', 'always', { ignorePackages: true }],
110+
},
111+
},
112+
/**
113+
* CJS node files
114+
*/
115+
{
116+
files: [
117+
'**/*.cjs',
118+
'.prettierrc.js',
119+
'.stylelintrc.js',
120+
'.template-lintrc.js',
121+
'addon-main.cjs',
122+
],
123+
plugins: {
124+
n,
125+
},
126+
127+
languageOptions: {
128+
sourceType: 'script',
129+
ecmaVersion: 'latest',
130+
globals: {
131+
...globals.node,
132+
},
133+
},
134+
},
135+
/**
136+
* ESM node files
137+
*/
138+
{
139+
files: ['**/*.mjs'],
140+
plugins: {
141+
n,
142+
},
143+
144+
languageOptions: {
145+
sourceType: 'module',
146+
ecmaVersion: 'latest',
147+
parserOptions: parserOptions.esm.js,
148+
globals: {
149+
...globals.node,
150+
},
151+
},
152+
},
153+
);

addon/package.json

Lines changed: 35 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -45,78 +45,60 @@
4545
"dist"
4646
],
4747
"scripts": {
48-
"build": "concurrently 'npm:build:*'",
49-
"build:js": "rollup --config",
50-
"build:types": "glint --declaration",
51-
"lint": "concurrently 'npm:lint:*(!fix)' --names 'lint:'",
52-
"lint:fix": "concurrently 'npm:lint:*:fix' --names 'fix:'",
48+
"build": "rollup --config",
49+
"format": "prettier . --cache --write",
50+
"lint": "concurrently \"pnpm:lint:*(!fix)\" --names \"lint:\" --prefixColors auto",
51+
"lint:fix": "concurrently \"pnpm:lint:*:fix\" --names \"fix:\" --prefixColors auto && pnpm run format",
52+
"lint:format": "prettier . --cache --check",
5353
"lint:hbs": "ember-template-lint . --no-error-on-unmatched-pattern",
5454
"lint:hbs:fix": "ember-template-lint . --fix --no-error-on-unmatched-pattern",
5555
"lint:js": "eslint . --cache",
5656
"lint:js:fix": "eslint . --fix",
5757
"lint:types": "glint",
5858
"prepack": "rollup --config",
59-
"start": "concurrently 'npm:start:*'",
60-
"start:js": "rollup --config --watch --no-watch.clearScreen",
61-
"start:types": "glint --declaration --watch",
59+
"start": "rollup --config --watch",
6260
"test": "echo 'A v2 addon does not have tests, run tests in test-app'"
6361
},
6462
"dependencies": {
65-
"@embroider/addon-shim": "^1.8.7",
63+
"@embroider/addon-shim": "^1.8.9",
6664
"@embroider/macros": "^1.13.3",
6765
"assert-never": "^1.2.1",
68-
"decorator-transforms": "^2.0.0",
66+
"decorator-transforms": "^2.2.2",
6967
"ember-element-helper": ">=0.6.1"
7068
},
7169
"devDependencies": {
72-
"@babel/core": "^7.26.0",
73-
"@babel/plugin-transform-typescript": "^7.23.6",
74-
"@babel/runtime": "^7.26.0",
75-
"@embroider/addon-dev": "^6.0.1",
70+
"@babel/core": "^7.26.10",
71+
"@babel/eslint-parser": "^7.26.10",
72+
"@babel/plugin-transform-typescript": "^7.26.8",
73+
"@babel/runtime": "^7.26.10",
74+
"@embroider/addon-dev": "^7.1.3",
7675
"@glimmer/env": "^0.1.7",
77-
"@glint/core": "^1.3.0",
78-
"@glint/environment-ember-loose": "^1.3.0",
79-
"@glint/environment-ember-template-imports": "^1.3.0",
80-
"@glint/template": "^1.5.0",
76+
"@eslint/js": "^9.22.0",
77+
"@glint/core": "^1.5.2",
78+
"@glint/environment-ember-loose": "^1.5.2",
79+
"@glint/environment-ember-template-imports": "^1.5.2",
80+
"@glint/template": "^1.2.1",
8181
"@rollup/plugin-babel": "^6.0.4",
82-
"@tsconfig/ember": "^3.0.8",
83-
"@types/ember": "^4.0.11",
84-
"@types/ember__application": "^4.0.11",
85-
"@types/ember__array": "^4.0.10",
86-
"@types/ember__component": "^4.0.22",
87-
"@types/ember__controller": "^4.0.12",
88-
"@types/ember__debug": "^4.0.8",
89-
"@types/ember__destroyable": "^4.0.5",
90-
"@types/ember__engine": "^4.0.11",
91-
"@types/ember__error": "^4.0.6",
92-
"@types/ember__helper": "^4.0.8",
93-
"@types/ember__modifier": "^4.0.9",
94-
"@types/ember__object": "^4.0.12",
95-
"@types/ember__owner": "^4.0.9",
96-
"@types/ember__polyfills": "^4.0.6",
97-
"@types/ember__routing": "^4.0.22",
98-
"@types/ember__runloop": "^4.0.10",
99-
"@types/ember__service": "^4.0.9",
100-
"@types/ember__string": "^3.16.3",
101-
"@types/ember__template": "^4.0.7",
102-
"@types/ember__test": "^4.0.6",
103-
"@types/ember__utils": "^4.0.7",
104-
"@typescript-eslint/eslint-plugin": "^7.0.2",
105-
"@typescript-eslint/parser": "^7.0.2",
106-
"babel-plugin-ember-template-compilation": "^2.2.1",
107-
"concurrently": "^9.1.0",
108-
"ember-template-lint": "^6.0.0",
109-
"eslint": "^8.56.0",
110-
"eslint-config-prettier": "^9.1.0",
111-
"eslint-plugin-ember": "^12.3.3",
82+
"@tsconfig/ember": "^3.0.9",
83+
"babel-plugin-ember-template-compilation": "^2.3.0",
84+
"concurrently": "^9.1.2",
85+
"ember-source": "^5.4.0",
86+
"ember-template-lint": "^6.1.0",
87+
"eslint": "^9.22.0",
88+
"eslint-config-prettier": "^10.1.1",
89+
"eslint-plugin-ember": "^12.5.0",
90+
"eslint-plugin-import": "^2.31.0",
11291
"eslint-plugin-n": "^17.16.2",
113-
"eslint-plugin-prettier": "^5.2.1",
114-
"prettier": "^3.4.2",
115-
"prettier-plugin-ember-template-tag": "^2.0.0",
116-
"rollup": "^4.18.0",
117-
"typescript": "^5.3.3"
92+
"globals": "^16.0.0",
93+
"prettier": "^3.5.3",
94+
"prettier-plugin-ember-template-tag": "^2.0.4",
95+
"rollup": "^4.36.0",
96+
"rollup-plugin-copy": "^3.5.0",
97+
"typescript": "~5.8.2",
98+
"typescript-eslint": "^7.18.0"
11899
},
119100
"peerDependencies": {
101+
"ember-source": ">=4.8.0",
120102
"@ember/test-helpers": "^2.6.0 || ^3.0.0 || >= 4.0.0"
121103
},
122104
"peerDependenciesMeta": {

0 commit comments

Comments
 (0)